spring-security
spring-security copied to clipboard
Support custom `OAuth2AuthenticatedPrincipal` in Jwt-based authentication flow
This PR implements a simpler approach, as suggested by @jzheaux, to support OAuth2AuthenticatedPrincipal injection into JwtAuthenticationToken
Resolves: #6237
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 (Jwt jwt, Object principal, Collection<GrantedAuthority> authorities) as written in #32 because we already have a constructor with 3 arguments (Jwt jwt, Collection<? extends GrantedAuthority> authorities, String name). Because of this we have a build failing now.