Class JwtEncodingContext
java.lang.Object
org.springframework.security.oauth2.server.authorization.token.JwtEncodingContext
- All Implemented Interfaces:
Context,OAuth2TokenContext
An
OAuth2TokenContext implementation used when encoding a Jwt.- Since:
- 7.0
- 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>> -
Field Summary
Fields inherited from interface org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext
DPOP_PROOF_KEY -
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.Returns theJWS headersallowing the ability to add, replace, or remove.booleanReturnstrueif an attribute associated to the key exists,falseotherwise.static JwtEncodingContext.Builderwith(JwsHeader.Builder jwsHeaderBuilder, JwtClaimsSet.Builder claimsBuilder) Constructs a newJwtEncodingContext.Builderwith the provided JWS headers and 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. -
getJwsHeader
Returns theJWS headersallowing the ability to add, replace, or remove.- Returns:
- the
JwsHeader.Builder
-
getClaims
Returns theclaimsallowing the ability to add, replace, or remove.- Returns:
- the
JwtClaimsSet.Builder
-
with
public static JwtEncodingContext.Builder with(JwsHeader.Builder jwsHeaderBuilder, JwtClaimsSet.Builder claimsBuilder) Constructs a newJwtEncodingContext.Builderwith the provided JWS headers and claims.- Parameters:
jwsHeaderBuilder- the JWS headers to initialize the builderclaimsBuilder- the claims to initialize the builder- Returns:
- the
JwtEncodingContext.Builder
-