Interface OidcUser
-
- All Superinterfaces:
AuthenticatedPrincipal
,ClaimAccessor
,IdTokenClaimAccessor
,OAuth2AuthenticatedPrincipal
,OAuth2User
,StandardClaimAccessor
- All Known Implementing Classes:
DefaultOidcUser
public interface OidcUser extends OAuth2User, IdTokenClaimAccessor
A representation of a userPrincipal
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 theOidcIdToken
and theOidcUserInfo
(if available).Implementation instances of this interface represent an
AuthenticatedPrincipal
which is associated to anAuthentication
object and may be accessed viaAuthentication.getPrincipal()
.- Since:
- 5.0
- See Also:
DefaultOidcUser
,OAuth2User
,OidcIdToken
,OidcUserInfo
,IdTokenClaimAccessor
,StandardClaimAccessor
, ID Token, Standard Claims
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getClaims()
Returns the claims about the user.OidcIdToken
getIdToken()
Returns theID Token
containing claims about the user.OidcUserInfo
getUserInfo()
Returns theUserInfo
containing claims about the user.-
Methods inherited from interface org.springframework.security.core.AuthenticatedPrincipal
getName
-
Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
containsClaim, 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 Detail
-
getClaims
java.util.Map<java.lang.String,java.lang.Object> 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.
-
-