Interface OidcUser
- All Superinterfaces:
AuthenticatedPrincipal
,ClaimAccessor
,IdTokenClaimAccessor
,OAuth2AuthenticatedPrincipal
,OAuth2User
,StandardClaimAccessor
- All Known Implementing Classes:
DefaultOidcUser
A representation of a user
Principal
that is registered with an OpenID Connect
1.0 Provider.
An OidcUser
contains "claims" about the authentication of the
End-User. The claims are aggregated from the OidcIdToken
and the
OidcUserInfo
(if available).
Implementation instances of this interface represent an AuthenticatedPrincipal
which is associated to an Authentication
object and may be accessed via
Authentication.getPrincipal()
.
- Since:
- 5.0
- See Also:
-
Method Summary
Methods inherited from interface org.springframework.security.core.AuthenticatedPrincipal
getName
Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, hasClaim
Methods inherited from interface org.springframework.security.oauth2.core.oidc.IdTokenClaimAccessor
getAccessTokenHash, getAudience, getAuthenticatedAt, getAuthenticationContextClass, getAuthenticationMethods, getAuthorizationCodeHash, getAuthorizedParty, getExpiresAt, getIssuedAt, getIssuer, getNonce, getSubject
Methods inherited from interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
getAttribute, getAttributes, getAuthorities
Methods inherited from interface org.springframework.security.oauth2.core.oidc.StandardClaimAccessor
getAddress, getBirthdate, getEmail, getEmailVerified, getFamilyName, getFullName, getGender, getGivenName, getLocale, getMiddleName, getNickName, getPhoneNumber, getPhoneNumberVerified, getPicture, getPreferredUsername, getProfile, getUpdatedAt, getWebsite, getZoneInfo
-
Method Details
-
getClaims
Returns the claims about the user. The claims are aggregated fromgetIdToken()
andgetUserInfo()
(if available).- Specified by:
getClaims
in interfaceClaimAccessor
- Returns:
- a
Map
of claims about the user
-
getUserInfo
OidcUserInfo getUserInfo()Returns theUserInfo
containing claims about the user.- Returns:
- the
OidcUserInfo
containing claims about the user.
-
getIdToken
OidcIdToken getIdToken()Returns theID Token
containing claims about the user.- Returns:
- the
OidcIdToken
containing claims about the user.
-