Class OAuth2TokenClaimsContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.token.OAuth2TokenClaimsContext
- All Implemented Interfaces:
Context, OAuth2TokenContext
An
OAuth2TokenContext implementation that provides access to the
claims of an OAuth 2.0 Token, allowing the ability to customize.- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface OAuth2TokenContext
OAuth2TokenContext.AbstractBuilder<T,B> -
Field Summary
Fields inherited from interface OAuth2TokenContext
DPOP_PROOF_KEY -
Method Summary
Modifier and TypeMethodDescription<V> @Nullable VReturns the value of the attribute associated to the key.Returns theclaimsallowing the ability to add, replace, or remove.booleanReturnstrueif an attribute associated to the key exists,falseotherwise.with(OAuth2TokenClaimsSet.Builder claimsBuilder) Constructs a newOAuth2TokenClaimsContext.Builderwith the provided claims.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OAuth2TokenContext
getAuthorization, getAuthorizationGrant, getAuthorizationGrantType, getAuthorizationServerContext, getAuthorizedScopes, getPrincipal, getRegisteredClient, getTokenType
-
Method Details
-
get
Description copied from interface:ContextReturns the value of the attribute associated to the key. -
hasKey
Description copied from interface:ContextReturnstrueif an attribute associated to the key exists,falseotherwise. -
getClaims
Returns theclaimsallowing the ability to add, replace, or remove.- Returns:
- the
OAuth2TokenClaimsSet.Builder
-
with
Constructs a newOAuth2TokenClaimsContext.Builderwith the provided claims.- Parameters:
claimsBuilder- the claims to initialize the builder- Returns:
- the
OAuth2TokenClaimsContext.Builder
-