Class OidcIdToken
java.lang.Object
org.springframework.security.oauth2.core.AbstractOAuth2Token
org.springframework.security.oauth2.core.oidc.OidcIdToken
- All Implemented Interfaces:
Serializable, ClaimAccessor, OAuth2Token, IdTokenClaimAccessor, StandardClaimAccessor
An implementation of an
AbstractOAuth2Token representing an OpenID Connect Core
1.0 ID Token.
The OidcIdToken is a security token that contains "claims" about the
authentication of an End-User by an Authorization Server.
- Since:
- 5.0
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of claims that may be used for assertions.static OidcIdToken.BuilderwithTokenValue(String tokenValue) Create aOidcIdToken.Builderbased on the given token value.Methods inherited from class AbstractOAuth2Token
equals, getExpiresAt, getIssuedAt, getTokenValue, hashCodeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 StandardClaimAccessor
getAddress, getBirthdate, getEmail, getEmailVerified, getFamilyName, getFullName, getGender, getGivenName, getLocale, getMiddleName, getNickName, getPhoneNumber, getPhoneNumberVerified, getPicture, getPreferredUsername, getProfile, getUpdatedAt, getWebsite, getZoneInfo
-
Constructor Details
-
OidcIdToken
public OidcIdToken(String tokenValue, @Nullable Instant issuedAt, @Nullable Instant expiresAt, Map<String, Object> claims) Constructs aOidcIdTokenusing the provided parameters.- Parameters:
tokenValue- the ID Token valueissuedAt- the time at which the ID Token was issued(iat), may benullexpiresAt- the expiration time(exp)on or after which the ID Token MUST NOT be accepted, may benullclaims- the claims about the authentication of the End-User
-
-
Method Details
-
getClaims
Description copied from interface:ClaimAccessorReturns a set of claims that may be used for assertions.- Specified by:
getClaimsin interfaceClaimAccessor- Returns:
- a
Mapof claims
-
withTokenValue
Create aOidcIdToken.Builderbased on the given token value.- Parameters:
tokenValue- the token value to use- Returns:
- the
OidcIdToken.Builderfor further configuration - Since:
- 5.3
-