Closed
Description
OAuth2AuthenticatedPrincipal
is an AuthenticatedPrincipal
that adds getAuthorities
as well as getAttributes
. It represents the principal associated with an OAuth 2.0 token.
A user is a type of principal, so having OAuth2User
extend OAuth2AuthenticatedPrincipal
makes sense.
Additionally, it will reduce the code that OAuth2User
needs to maintain, plus it will get the nice benefit of a getAttribute
default method.