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:
- 0.1.0
- See Also:
-
OAuth2TokenContext
JwsHeader.Builder
JwtClaimsSet.Builder
JwtEncoder.encode(JwtEncoderParameters)
-
Nested Class Summary
Nested 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> V
Returns the value of the attribute associated to the key.org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder
Returns theclaims
allowing the ability to add, replace, or remove.org.springframework.security.oauth2.jwt.JwsHeader.Builder
Returns theJWS headers
allowing the ability to add, replace, or remove.boolean
Returnstrue
if an attribute associated to the key exists,false
otherwise.static JwtEncodingContext.Builder
with
(org.springframework.security.oauth2.jwt.JwsHeader.Builder jwsHeaderBuilder, org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder claimsBuilder) Constructs a newJwtEncodingContext.Builder
with the provided JWS headers and claims.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.oauth2.server.authorization.context.Context
get
Methods 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:Context
Returns the value of the attribute associated to the key. -
hasKey
Description copied from interface:Context
Returnstrue
if an attribute associated to the key exists,false
otherwise. -
getJwsHeader
public org.springframework.security.oauth2.jwt.JwsHeader.Builder getJwsHeader()Returns theJWS headers
allowing the ability to add, replace, or remove.- Returns:
- the
JwsHeader.Builder
-
getClaims
public org.springframework.security.oauth2.jwt.JwtClaimsSet.Builder getClaims()Returns theclaims
allowing 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.Builder
with 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
-