Class OAuth2AuthorizeRequest.Builder
java.lang.Object
org.springframework.security.oauth2.client.OAuth2AuthorizeRequest.Builder
- Enclosing class:
- OAuth2AuthorizeRequest
A builder for
OAuth2AuthorizeRequest.-
Method Summary
Modifier and TypeMethodDescriptionSets an attribute associated to the request.attributes(Consumer<Map<String, Object>> attributesConsumer) Provides aConsumeraccess to the attributes associated to the request.build()Builds a newOAuth2AuthorizeRequest.Sets the name of thePrincipal(to be) associated to the authorized client.principal(Authentication principal) Sets thePrincipal(to be) associated to the authorized client.
-
Method Details
-
principal
Sets the name of thePrincipal(to be) associated to the authorized client.- Parameters:
principalName- the name of thePrincipal(to be) associated to the authorized client- Returns:
- the
OAuth2AuthorizeRequest.Builder - Since:
- 5.3
-
principal
Sets thePrincipal(to be) associated to the authorized client.- Parameters:
principal- thePrincipal(to be) associated to the authorized client- Returns:
- the
OAuth2AuthorizeRequest.Builder
-
attributes
Provides aConsumeraccess to the attributes associated to the request.- Parameters:
attributesConsumer- aConsumerof the attributes associated to the request- Returns:
- the
OAuth2AuthorizeRequest.Builder
-
attribute
Sets an attribute associated to the request.- Parameters:
name- the name of the attributevalue- the value of the attribute- Returns:
- the
OAuth2AuthorizeRequest.Builder
-
build
Builds a newOAuth2AuthorizeRequest.- Returns:
- a
OAuth2AuthorizeRequest
-