In reactive gateway, I can do:
spring:
cloud:
gateway:
routes:
- id: cashcards
uri: http://localhost:8090
predicates:
- Path=/cashcards/**
filters:
- TokenRelay=cashcard-client
In this example, I'm specifying cashcard-client as the registrationId to use for performing a token relay, instead of relying on the default behavior which resolves the registrationId from the current user (via the principal, which is an instance of OAuth2AuthenticationToken).
Note: The same can be accomplished with the DSL using f.tokenRelay("cashcard-client").
The same support and overloaded DSL option could be added to TokenRelayFilterFunctions for the mvc gateway. I'm happy to raise a PR for this.
In reactive gateway, I can do:
In this example, I'm specifying
cashcard-clientas theregistrationIdto use for performing a token relay, instead of relying on the default behavior which resolves theregistrationIdfrom the current user (via the principal, which is an instance ofOAuth2AuthenticationToken).Note: The same can be accomplished with the DSL using
f.tokenRelay("cashcard-client").The same support and overloaded DSL option could be added to
TokenRelayFilterFunctionsfor the mvc gateway. I'm happy to raise a PR for this.