T - the type of the contextB - the type of the builderpublic abstract static class OAuth2TokenContext.AbstractBuilder<T extends OAuth2TokenContext,B extends OAuth2TokenContext.AbstractBuilder<T,B>>
extends java.lang.Object
OAuth2TokenContext.| Constructor and Description |
|---|
AbstractBuilder() |
| Modifier and Type | Method and Description |
|---|---|
B |
authorization(OAuth2Authorization authorization)
Sets the
authorization. |
B |
authorizationGrant(org.springframework.security.core.Authentication authorizationGrant)
Sets the
Authentication representing the authorization grant. |
B |
authorizationGrantType(org.springframework.security.oauth2.core.AuthorizationGrantType authorizationGrantType)
Sets the
authorization grant type. |
B |
authorizedScopes(java.util.Set<java.lang.String> authorizedScopes)
Sets the authorized scope(s).
|
abstract T |
build()
Builds a new
OAuth2TokenContext. |
B |
context(java.util.function.Consumer<java.util.Map<java.lang.Object,java.lang.Object>> contextConsumer)
A
Consumer of the attributes Map
allowing the ability to add, replace, or remove. |
protected <V> V |
get(java.lang.Object key) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
getContext() |
protected B |
getThis() |
B |
principal(org.springframework.security.core.Authentication principal)
Sets the
Authentication representing the Principal resource owner (or client). |
B |
providerContext(ProviderContext providerContext)
Sets the
provider context. |
B |
put(java.lang.Object key,
java.lang.Object value)
Associates an attribute.
|
B |
registeredClient(RegisteredClient registeredClient)
Sets the
registered client. |
B |
tokenType(OAuth2TokenType tokenType)
Sets the
token type. |
public B registeredClient(RegisteredClient registeredClient)
registered client.registeredClient - the RegisteredClientOAuth2TokenContext.AbstractBuilder for further configurationpublic B principal(org.springframework.security.core.Authentication principal)
Authentication representing the Principal resource owner (or client).principal - the Authentication representing the Principal resource owner (or client)OAuth2TokenContext.AbstractBuilder for further configurationpublic B providerContext(ProviderContext providerContext)
provider context.providerContext - the ProviderContextOAuth2TokenContext.AbstractBuilder for further configurationpublic B authorization(OAuth2Authorization authorization)
authorization.authorization - the OAuth2AuthorizationOAuth2TokenContext.AbstractBuilder for further configurationpublic B authorizedScopes(java.util.Set<java.lang.String> authorizedScopes)
authorizedScopes - the authorized scope(s)OAuth2TokenContext.AbstractBuilder for further configurationpublic B tokenType(OAuth2TokenType tokenType)
token type.tokenType - the OAuth2TokenTypeOAuth2TokenContext.AbstractBuilder for further configurationpublic B authorizationGrantType(org.springframework.security.oauth2.core.AuthorizationGrantType authorizationGrantType)
authorization grant type.authorizationGrantType - the AuthorizationGrantTypeOAuth2TokenContext.AbstractBuilder for further configurationpublic B authorizationGrant(org.springframework.security.core.Authentication authorizationGrant)
Authentication representing the authorization grant.authorizationGrant - the Authentication representing the authorization grantOAuth2TokenContext.AbstractBuilder for further configurationpublic B put(java.lang.Object key, java.lang.Object value)
key - the key for the attributevalue - the value of the attributeOAuth2TokenContext.AbstractBuilder for further configurationpublic B context(java.util.function.Consumer<java.util.Map<java.lang.Object,java.lang.Object>> contextConsumer)
Consumer of the attributes Map
allowing the ability to add, replace, or remove.contextConsumer - a Consumer of the attributes MapOAuth2TokenContext.AbstractBuilder for further configurationprotected <V> V get(java.lang.Object key)
protected java.util.Map<java.lang.Object,java.lang.Object> getContext()
protected final B getThis()
public abstract T build()
OAuth2TokenContext.OAuth2TokenContext