1
votes

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.

I try to create spring cloud gateway filter to add JWT bearer token. I'm having issue to write the filter.

Here's the workflow

I've tried to use @RegisteredOAuth2AuthorizedClient but it didn't work with Spring cloud gateway filter. After, I tried oAuth2AuthorizedClientService and to UAA loadAuthorizedClient but there was no access token.

For the code, here's my github-repo!

I expect the Spring cloud gateway filter to add the header Authorization with the JWT Token.

1

1 Answers

-1
votes

This sample shows how to set up Spring Cloud Gateway with Spring Security OAuth2.