Skip to content

Re-structure OAuth2AuthenticationToken #4553

@jgrandja

Description

@jgrandja

We should introduce a new Authentication that holds credentials returned from the Token Endpoint, for example, Access Token, Refresh Token and ID Token (for OIDC flows).

In the current design, OAuth2AuthenticationToken holds AccessToken and IdToken. With the proposed design, the new OAuth2TokensAuthenticationToken would hold the AccessToken and RefreshToken (future construct) and extend from AbstractAuthenticationToken

OAuth2AuthenticationToken should then extend OAuth2TokensAuthenticationToken which will hold the principal and associated authorities.

Hierarchy: OAuth2AuthenticationToken -> OAuth2TokensAuthenticationToken -> AbstractAuthenticationToken

Related #4521

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