OAuth2User should extend OAuth2AuthenticatedPrincipal #7378
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
OAuth2AuthenticatedPrincipal
is anAuthenticatedPrincipal
that addsgetAuthorities
as well asgetAttributes
. It represents the principal associated with an OAuth 2.0 token.A user is a type of principal, so having
OAuth2User
extendOAuth2AuthenticatedPrincipal
makes sense.Additionally, it will reduce the code that
OAuth2User
needs to maintain, plus it will get the nice benefit of agetAttribute
default method.The text was updated successfully, but these errors were encountered: