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:
- 0.2.3
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext
OAuth2TokenContext.AbstractBuilder<T extends OAuth2TokenContext,B extends OAuth2TokenContext.AbstractBuilder<T, B>> -
Method Summary
Modifier and TypeMethodDescription<V> 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.oauth2.server.authorization.context.Context
getMethods inherited from interface org.springframework.security.oauth2.server.authorization.token.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
-