Nimbus JwtDecoders should differentiate token and service errors #7885
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
Uh oh!
There was an error while loading. Please reload this page.
In nearly all cases,
NimbusJwtDecoder
andNimbusReactiveJwtDecoder
throw aJwtException
when something goes wrong.However, this makes it tricky to differentiate between invalid tokens and invalid application state.
One way to improve this would be to introduce a new exception that extends
JwtException
. LikeBadCredentialsException
,BadJwtException
could be a good name.Then, if the exception is
BadJwtException
, the application can know that it's an invalid token instead of invalid application stateThe text was updated successfully, but these errors were encountered: