Class OAuth2TokenIntrospection
java.lang.Object
org.springframework.security.oauth2.server.authorization.OAuth2TokenIntrospection
- All Implemented Interfaces:
Serializable,ClaimAccessor,OAuth2TokenIntrospectionClaimAccessor
public final class OAuth2TokenIntrospection
extends Object
implements OAuth2TokenIntrospectionClaimAccessor, Serializable
A representation of the claims returned in an OAuth 2.0 Token Introspection Response.
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(boolean active) Constructs a newOAuth2TokenIntrospection.Builderinitialized with the providedactiveclaim.Returns the claims in the Token Introspection Response.withClaims(Map<String, Object> claims) Constructs a newOAuth2TokenIntrospection.Builderinitialized with the provided claims.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, hasClaimMethods inherited from interface org.springframework.security.oauth2.core.OAuth2TokenIntrospectionClaimAccessor
getAudience, getClientId, getExpiresAt, getId, getIssuedAt, getIssuer, getNotBefore, getScopes, getSubject, getTokenType, getUsername, isActive
-
Method Details
-
getClaims
Returns the claims in the Token Introspection Response.- Specified by:
getClaimsin interfaceClaimAccessor- Returns:
- a
Mapof the claims
-
builder
- Returns:
- the
OAuth2TokenIntrospection.Builder
-
builder
Constructs a newOAuth2TokenIntrospection.Builderinitialized with the providedactiveclaim.- Parameters:
active-trueif the token is currently active,falseotherwise- Returns:
- the
OAuth2TokenIntrospection.Builder
-
withClaims
Constructs a newOAuth2TokenIntrospection.Builderinitialized with the provided claims.- Parameters:
claims- the claims to initialize the builder- Returns:
- the
OAuth2TokenIntrospection.Builder
-