Interface OAuth2User
-
- All Superinterfaces:
AuthenticatedPrincipal
,OAuth2AuthenticatedPrincipal
- All Known Subinterfaces:
OidcUser
- All Known Implementing Classes:
DefaultOAuth2User
,DefaultOidcUser
public interface OAuth2User extends OAuth2AuthenticatedPrincipal
A representation of a userPrincipal
that is registered with an 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
OAuth2AuthenticatedPrincipal.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
OAuth2AuthenticatedPrincipal
which is associated to anAuthentication
object and may be accessed viaAuthentication.getPrincipal()
.- Since:
- 5.0
- See Also:
DefaultOAuth2User
,OAuth2AuthenticatedPrincipal
-
-
Method Summary
-
Methods inherited from interface org.springframework.security.core.AuthenticatedPrincipal
getName
-
Methods inherited from interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
getAttribute, getAttributes, getAuthorities
-
-