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 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.org.springframework.security.oauth2.jwt.JwtClaimsSet.BuilderReturns theclaimsallowing the ability to add, replace, or remove.org.springframework.security.oauth2.jwt.JwsHeader.BuilderReturns theJWS headersallowing the ability to add, replace, or remove.booleanReturnstrueif an attribute associated to the key exists,falseotherwise.static JwtEncodingContext.Builderwith(org.springframework.security.oauth2.jwt.JwsHeader.Builder jwsHeaderBuilder, org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder claimsBuilder) Constructs a newJwtEncodingContext.Builderwith the provided JWS headers and 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. -
getJwsHeader
public org.springframework.security.oauth2.jwt.JwsHeader.Builder getJwsHeader()Returns theJWS headersallowing the ability to add, replace, or remove.- Returns:
- the
JwsHeader.Builder
-
getClaims
public org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder getClaims()Returns theclaimsallowing the ability to add, replace, or remove.- Returns:
- the
JwtClaimsSet.Builder
-
with
public static JwtEncodingContext.Builder with(org.springframework.security.oauth2.jwt.JwsHeader.Builder jwsHeaderBuilder, org.springframework.security.oauth2.jwt.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
-