Publish a guide on how to set up Spring Cloud Gateway as an OAuth2 Client of Spring Authorization Server in order to use the gateway as a BFF (backend-for-frontend). This guide would demonstrate using the TokenRelay filter to adapt from a browser-based session (i.e. JSESSIONID cookie) to an Authorization header containing an access token (i.e. Bearer tokens) when making protected resources requests.
The guide should mention the main benefits of this architecture choice, which include:
- Securely storing access tokens (and refresh tokens) on the server (backend) instead of in the browser
- Centralizing OAuth2 Client configuration in the gateway
- Simplifying authentication requirements for browser-based (frontend) applications
Publish a guide on how to set up Spring Cloud Gateway as an OAuth2 Client of Spring Authorization Server in order to use the gateway as a BFF (backend-for-frontend). This guide would demonstrate using the
TokenRelayfilter to adapt from a browser-based session (i.e.JSESSIONIDcookie) to anAuthorizationheader containing an access token (i.e.Bearertokens) when making protected resources requests.The guide should mention the main benefits of this architecture choice, which include: