-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Expose strategy for converting Jwt into Authentication #5629
Comments
Is this for converting jwt based access token to authentication without having to invoke user-info service? Suggestion
|
@gburboz The initial target for this strategy is Resource Server, where the story is more about inferring a set of authorities from a bearer token and less about who is the subject. To that end, the converter for the time being only exposes an override for inferring a That said, yes, the idea is that broader conversions will be possible as well. At this point, the only place we have concrete plans to expose this strategy is in the Resource Server DSL. I like your suggestions for some common conversion use cases and have taken note. Would recommend that you open a ticket and ping @jgrandja about it. |
Exposes ability to specify a strategy for converting Jwt into an Authentication, specifically in JwtAuthenticationProvider. Fixes: spring-projectsgh-5629
Exposes ability to specify a strategy for converting Jwt into an Authentication, specifically in JwtAuthenticationProvider. Fixes: gh-5629
Let's expose a strategy for converting a Jwt into an Authentication.
The flow from bearer token to Authentication goes something like this:
String token -> Jwt jwt
Jwt jwt -> Authentication authentication
The first step can be configured by wiring
JwtAuthenticationProvider
with an instance ofJwtDecoder
.We could do the same thing with the second step.
Spring Core has a
Converter
interface that could work well.Let's include also an abstract implementation that makes it easier to only participate in the conversion of the Jwt into a set of GrantedAuthorities.
The text was updated successfully, but these errors were encountered: