Class OAuth2AuthorizationContext.Builder
java.lang.Object
org.springframework.security.oauth2.client.OAuth2AuthorizationContext.Builder
- Enclosing class:
- OAuth2AuthorizationContext
A builder for 
OAuth2AuthorizationContext.- 
Method SummaryModifier and TypeMethodDescriptionSets an attribute associated to the context.attributes(Consumer<Map<String, Object>> attributesConsumer) Provides aConsumeraccess to the attributes associated to the context.build()Builds a newOAuth2AuthorizationContext.principal(Authentication principal) Sets thePrincipal(to be) associated to the authorized client.
- 
Method Details- 
principalSets thePrincipal(to be) associated to the authorized client.- Parameters:
- principal- the- Principal(to be) associated to the authorized client
- Returns:
- the OAuth2AuthorizationContext.Builder
 
- 
attributespublic OAuth2AuthorizationContext.Builder attributes(Consumer<Map<String, Object>> attributesConsumer) Provides aConsumeraccess to the attributes associated to the context.- Parameters:
- attributesConsumer- a- Consumerof the attributes associated to the context
- Returns:
- the OAuth2AuthorizeRequest.Builder
 
- 
attributeSets an attribute associated to the context.- Parameters:
- name- the name of the attribute
- value- the value of the attribute
- Returns:
- the OAuth2AuthorizationContext.Builder
 
- 
buildBuilds a newOAuth2AuthorizationContext.- Returns:
- a OAuth2AuthorizationContext
 
 
-