Support custom OAuth2AuthenticatedPrincipal in Jwt-based authentication flow#17191
Support custom OAuth2AuthenticatedPrincipal in Jwt-based authentication flow#17191jzheaux merged 3 commits intospring-projects:mainfrom
OAuth2AuthenticatedPrincipal in Jwt-based authentication flow#17191Conversation
|
I think the current solution can't be merged now since at the very least we don't have tests. I would like to hear feedback if I have understood the solution to the current problem correctly. Also I guess we can't add a constructor to |
jzheaux
left a comment
There was a problem hiding this comment.
Thanks for the PR, @therepanic! I've left some feedback inline that I hope will also address your question about the new JwtAuthenticationToken constructor.
After you review my comments, if we are agreed, will you also please add tests that confirm the new setter methods work?
...ringframework/security/oauth2/server/resource/authentication/JwtAuthenticationConverter.java
Outdated
Show resolved
Hide resolved
...ringframework/security/oauth2/server/resource/authentication/JwtAuthenticationConverter.java
Outdated
Show resolved
Hide resolved
...rk/security/oauth2/server/resource/authentication/JwtBearerTokenAuthenticationConverter.java
Show resolved
Hide resolved
...rk/security/oauth2/server/resource/authentication/JwtBearerTokenAuthenticationConverter.java
Outdated
Show resolved
Hide resolved
...rk/security/oauth2/server/resource/authentication/JwtBearerTokenAuthenticationConverter.java
Outdated
Show resolved
Hide resolved
Closes spring-projectsgh-6237 Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
- Replace conditional logic with adapter class - Added tests Issue spring-projectsgh-6237 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
Issue spring-projectsgh-6237 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
|
Thanks for getting this PR started, @therepanic! I was able to add the needed tests and documentation. It will merge into |
This PR implements a simpler approach, as suggested by @jzheaux, to support
OAuth2AuthenticatedPrincipalinjection intoJwtAuthenticationTokenResolves: #6237