public interface OAuth2User extends AuthenticatedPrincipal
Principal
that is registered with a standard OAuth 2.0 Provider.
An OAuth 2.0 user is composed of one or more attributes, for example,
first name, middle name, last name, email, phone number, address, etc.
Each user attribute has a "name" and "value" and
is keyed by the "name" in getAttributes()
.
NOTE: Attribute names are not standardized between providers and therefore will vary. Please consult the provider's API documentation for the set of supported user attribute names.
Implementation instances of this interface represent an AuthenticatedPrincipal
which is associated to an Authentication
object
and may be accessed via Authentication.getPrincipal()
.
DefaultOAuth2User
,
AuthenticatedPrincipal
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes() |
java.util.Collection<? extends GrantedAuthority> |
getAuthorities() |
getName
java.util.Collection<? extends GrantedAuthority> getAuthorities()
java.util.Map<java.lang.String,java.lang.Object> getAttributes()