-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom registrationId
in tokenRelay()
for MVC gateway
#3541
Comments
PR away! |
Will do @spencergibb. I'll work on this in the coming week. It probably goes without saying, but I'm very excited about this feature and have used it in demos already (with reactive gateway). It truly makes this token relay feature useful in a huge variety of scenarios involving OAuth2 flows. For example, most recently we used it in the talk Cora gave at SpringOne with the In that example, the goal was for the user to never even be aware that gateway is exchanging tokens behind the scenes. I personally think this enables a whole new class of OAuth2-based applications where the use of OAuth2 is almost entirely invisible to the end user. Gateway effectively becomes a broker for negotiating and making secured requests to a variety of backend applications. (Of course, it's possible without gateway, but requires a lot more code and configuration.) /excited rant |
@sjohnr |
@EeeasyCode see #3591, let me know if you have any feedback. |
In reactive gateway, I can do:
In this example, I'm specifying
cashcard-client
as theregistrationId
to use for performing a token relay, instead of relying on the default behavior which resolves theregistrationId
from 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
TokenRelayFilterFunctions
for the mvc gateway. I'm happy to raise a PR for this.The text was updated successfully, but these errors were encountered: