Re-structure OAuth2AuthenticationToken #4553
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
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
holdsAccessToken
andIdToken
. With the proposed design, the newOAuth2TokensAuthenticationToken
would hold theAccessToken
andRefreshToken
(future construct) and extend fromAbstractAuthenticationToken
OAuth2AuthenticationToken
should then extendOAuth2TokensAuthenticationToken
which will hold theprincipal
and associatedauthorities
.Hierarchy:
OAuth2AuthenticationToken -> OAuth2TokensAuthenticationToken -> AbstractAuthenticationToken
Related #4521
The text was updated successfully, but these errors were encountered: