Skip to content

Nimbus OpaqueTokenIntrospectors should differentiate token and service errors #7902

Closed
@jzheaux

Description

@jzheaux

In nearly all cases, NimbusJwtDecoder and NimbusReactiveJwtDecoder throw aa OAuth2IntrospectionException 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 OAuth2IntrospectionException. Like BadCredentialsException, BadOpaqueTokenException could be a good name.

Then, if the exception is BadOpaqueTokenException, the application can know that it's an invalid token instead of invalid application state

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions