Support JwtValidationException on JwtReactiveAuthenticationManager #6823
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
Summary
JwtReactiveAuthenticationManager returns a BearerTokenError, regardless of the OAuth2Error returned by a JwtValidationException.
Actual Behavior
Expected Behavior
line 78:
OAuth2Error invalidRequest = e instanceof JwtValidationException ? ((JwtValidationException) e).getErrors().iterator().next() : invalidToken(e.getMessage());
Configuration
Using @EnableWebFluxSecurity and the default ReactiveAuthenticationManager (see sample for details)
Version
spring-security-oauth2-resource-server-5.1.5.RELEASE
Sample
Any application using oauth2resourceserver-webflux default configuration, when receiving an expired JWT, will return a generic BearerTokenError as defined on JwtReactiveAuthenticationManager.
The text was updated successfully, but these errors were encountered: