public final class JwtEncodingContext extends java.lang.Object implements OAuth2TokenContext
OAuth2TokenContext implementation used when encoding a Jwt.OAuth2TokenContext,
JwsHeader.Builder,
JwtClaimsSet.Builder,
JwtEncoder.encode(JwtEncoderParameters)| Modifier and Type | Class and Description |
|---|---|
static class |
JwtEncodingContext.Builder
A builder for
JwtEncodingContext. |
OAuth2TokenContext.AbstractBuilder<T extends OAuth2TokenContext,B extends OAuth2TokenContext.AbstractBuilder<T,B>>| Modifier and Type | Method and Description |
|---|---|
<V> V |
get(java.lang.Object key)
Returns the value of the attribute associated to the key.
|
org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder |
getClaims()
Returns the
claims
allowing the ability to add, replace, or remove. |
org.springframework.security.oauth2.jwt.JwsHeader.Builder |
getHeaders()
Returns the
headers
allowing the ability to add, replace, or remove. |
boolean |
hasKey(java.lang.Object key)
Returns
true if an attribute associated to the key exists, false otherwise. |
static JwtEncodingContext.Builder |
with(org.springframework.security.oauth2.jwt.JwsHeader.Builder headersBuilder,
org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder claimsBuilder)
Constructs a new
JwtEncodingContext.Builder with the provided headers and claims. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAuthorization, getAuthorizationGrant, getAuthorizationGrantType, getAuthorizedScopes, getPrincipal, getProviderContext, getRegisteredClient, getTokenType@Nullable public <V> V get(java.lang.Object key)
Contextpublic boolean hasKey(java.lang.Object key)
Contexttrue if an attribute associated to the key exists, false otherwise.public org.springframework.security.oauth2.jwt.JwsHeader.Builder getHeaders()
headers
allowing the ability to add, replace, or remove.JwsHeader.Builderpublic org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder getClaims()
claims
allowing the ability to add, replace, or remove.JwtClaimsSet.Builderpublic static JwtEncodingContext.Builder with(org.springframework.security.oauth2.jwt.JwsHeader.Builder headersBuilder, org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder claimsBuilder)
JwtEncodingContext.Builder with the provided headers and claims.headersBuilder - the headers to initialize the builderclaimsBuilder - the claims to initialize the builderJwtEncodingContext.Builder