public static class OAuth2AuthorizationContext.Builder
extends java.lang.Object
OAuth2AuthorizationContext
.Modifier and Type | Method and Description |
---|---|
OAuth2AuthorizationContext.Builder |
attribute(java.lang.String name,
java.lang.Object value)
Sets an attribute associated to the context.
|
OAuth2AuthorizationContext.Builder |
attributes(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> attributesConsumer)
Provides a
Consumer access to the attributes associated to the context. |
OAuth2AuthorizationContext |
build()
Builds a new
OAuth2AuthorizationContext . |
OAuth2AuthorizationContext.Builder |
principal(Authentication principal)
Sets the
Principal (to be) associated to the authorized client. |
public OAuth2AuthorizationContext.Builder principal(Authentication principal)
Principal
(to be) associated to the authorized client.principal
- the Principal
(to be) associated to the authorized clientOAuth2AuthorizationContext.Builder
public OAuth2AuthorizationContext.Builder attributes(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> attributesConsumer)
Consumer
access to the attributes associated to the context.attributesConsumer
- a Consumer
of the attributes associated to the contextOAuth2AuthorizeRequest.Builder
public OAuth2AuthorizationContext.Builder attribute(java.lang.String name, java.lang.Object value)
name
- the name of the attributevalue
- the value of the attributeOAuth2AuthorizationContext.Builder
public OAuth2AuthorizationContext build()
OAuth2AuthorizationContext
.OAuth2AuthorizationContext