Class OAuth2AuthenticationContext.AbstractBuilder<T extends OAuth2AuthenticationContext,B extends OAuth2AuthenticationContext.AbstractBuilder<T,B>>
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthenticationContext.AbstractBuilder<T,B>
- Type Parameters:
T
- the type of the authentication contextB
- the type of the builder
- Direct Known Subclasses:
OAuth2AccessTokenAuthenticationContext.Builder
,OAuth2AuthorizationCodeRequestAuthenticationContext.Builder
,OAuth2AuthorizationConsentAuthenticationContext.Builder
,OAuth2ClientAuthenticationContext.Builder
,OAuth2ClientCredentialsAuthenticationContext.Builder
,OidcUserInfoAuthenticationContext.Builder
- Enclosing interface:
- OAuth2AuthenticationContext
public abstract static class OAuth2AuthenticationContext.AbstractBuilder<T extends OAuth2AuthenticationContext,B extends OAuth2AuthenticationContext.AbstractBuilder<T,B>>
extends Object
A builder for subclasses of
OAuth2AuthenticationContext
.- Since:
- 0.2.1
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractBuilder
(org.springframework.security.core.Authentication authentication) -
Method Summary
Modifier and TypeMethodDescriptionabstract T
build()
Builds a newOAuth2AuthenticationContext
.AConsumer
of the attributesMap
allowing the ability to add, replace, or remove.protected <V> V
protected final B
getThis()
Associates an attribute.
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder(org.springframework.security.core.Authentication authentication)
-
-
Method Details
-
put
Associates an attribute.- Parameters:
key
- the key for the attributevalue
- the value of the attribute- Returns:
- the
OAuth2AuthenticationContext.AbstractBuilder
for further configuration
-
context
AConsumer
of the attributesMap
allowing the ability to add, replace, or remove.- Parameters:
contextConsumer
- aConsumer
of the attributesMap
- Returns:
- the
OAuth2AuthenticationContext.AbstractBuilder
for further configuration
-
get
-
getContext
-
getThis
-
build
Builds a newOAuth2AuthenticationContext
.- Returns:
- the
OAuth2AuthenticationContext
-