title: How to create Spring Cloud gateway filter to add client-credentials access token?
body: <p>I move from Spring Boot 1.5.20 to Spring Boot 2.1.4. 
  I rewrite my application that was using Zuul and Spring security oauth to Spring cloud gateway and spring-security-oauth2-client.</p>
  
  <p>I try to create spring cloud gateway filter to add JWT bearer token. I'm having issue to write the filter.</p>
  
  <p>Here's the <a href="https://github.com/louisthomas/spring-cloud-gateway-oauth2-client-credentials/blob/master/README.md" rel="nofollow noreferrer">workflow</a></p>
  
  <p>I've tried to use <a href="https://docs.spring.io/spring-security/site/docs/current/reference/html5/#webflux-roac" rel="nofollow noreferrer">@RegisteredOAuth2AuthorizedClient</a> but it didn't work with Spring cloud gateway filter. After, I tried oAuth2AuthorizedClientService and to UAA loadAuthorizedClient but there was no access token.</p>
  
  <p>For the code, here's my <a href="https://github.com/louisthomas/spring-cloud-gateway-oauth2-client-credentials" rel="nofollow noreferrer">github-repo!</a></p>
  
  <p>I expect the Spring cloud gateway filter to add the header Authorization with the JWT Token.</p>