Add BearerTokenErrors #7823
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
Because Bearer Token Error handling is based on a spec, there are only a few things that end up changing, depending on the kind of error.
For example, if we have an
invalid_request
, by default, we will always have a status code of 400, a uri pointing to that reference in the spec, and no scopes listed. Only the description is likely to change.If we have an
invalid_token
, then the same is true, just changing the status code.It would be nice to have a simple class like:
This would clean up code in
JwtAuthenticationProvider
,DefaultBearerTokenResolver
, and several others. Generally, it would also help users to create spec compliant errors.The text was updated successfully, but these errors were encountered: