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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a set of claims that may be used for assertions.static OidcIdToken.Builder
withTokenValue
(String tokenValue) Create aOidcIdToken.Builder
based on the given token valueMethods inherited from class org.springframework.security.oauth2.core.AbstractOAuth2Token
equals, getExpiresAt, getIssuedAt, getTokenValue, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
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.oidc.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, Instant issuedAt, Instant expiresAt, Map<String, Object> claims) Constructs aOidcIdToken
using the provided parameters.- Parameters:
tokenValue
- the ID Token valueissuedAt
- the time at which the ID Token was issued(iat)
expiresAt
- the expiration time(exp)
on or after which the ID Token MUST NOT be acceptedclaims
- the claims about the authentication of the End-User
-
-
Method Details
-
getClaims
Description copied from interface:ClaimAccessor
Returns a set of claims that may be used for assertions.- Specified by:
getClaims
in interfaceClaimAccessor
- Returns:
- a
Map
of claims
-
withTokenValue
Create aOidcIdToken.Builder
based on the given token value- Parameters:
tokenValue
- the token value to use- Returns:
- the
OidcIdToken.Builder
for further configuration - Since:
- 5.3
-