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
Modifier and TypeMethodDescriptionReturns the claims about the user.Returns theID Tokencontaining claims about the user.@Nullable OidcUserInfoReturns theUserInfocontaining claims about the user, ornullif not present.Methods inherited from interface AuthenticatedPrincipal
getNameMethods inherited from interface ClaimAccessor
getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, hasClaimMethods inherited from interface IdTokenClaimAccessor
getAccessTokenHash, getAudience, getAuthenticatedAt, getAuthenticationContextClass, getAuthenticationMethods, getAuthorizationCodeHash, getAuthorizedParty, getExpiresAt, getIssuedAt, getIssuer, getNonce, getSubjectMethods inherited from interface OAuth2AuthenticatedPrincipal
getAttribute, getAttributes, getAuthoritiesMethods inherited from interface 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:
getClaimsin interfaceClaimAccessor- Returns:
- a
Mapof claims about the user
-
getUserInfo
@Nullable OidcUserInfo getUserInfo()Returns theUserInfocontaining claims about the user, ornullif not present.- Returns:
- the
OidcUserInfocontaining claims about the user, ornull
-
getIdToken
OidcIdToken getIdToken()Returns theID Tokencontaining claims about the user.- Returns:
- the
OidcIdTokencontaining claims about the user.
-