Class OAuth2AuthorizeRequest
java.lang.Object
org.springframework.security.oauth2.client.OAuth2AuthorizeRequest
Represents a request the 
OAuth2AuthorizedClientManager uses to
 authorize (or
 re-authorize) the client identified by the provided
 clientRegistrationId.- Since:
 - 5.2
 - See Also:
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescription<T> TgetAttribute(String name) Returns the value of an attribute associated to the request ornullif not available.Returns the attributes associated to the request.Returns theauthorized clientornullif it was not provided.Returns the identifier for theclient registration.Returns thePrincipal(to be) associated to the authorized client.withAuthorizedClient(OAuth2AuthorizedClient authorizedClient) Returns a newOAuth2AuthorizeRequest.Builderinitialized with theauthorized client.withClientRegistrationId(String clientRegistrationId) Returns a newOAuth2AuthorizeRequest.Builderinitialized with the identifier for theclient registration. 
- 
Method Details
- 
getClientRegistrationId
Returns the identifier for theclient registration.- Returns:
 - the identifier for the client registration
 
 - 
getAuthorizedClient
Returns theauthorized clientornullif it was not provided.- Returns:
 - the 
OAuth2AuthorizedClientornullif it was not provided 
 - 
getPrincipal
Returns thePrincipal(to be) associated to the authorized client.- Returns:
 - the 
Principal(to be) associated to the authorized client 
 - 
getAttributes
Returns the attributes associated to the request.- Returns:
 - a 
Mapof the attributes associated to the request 
 - 
getAttribute
Returns the value of an attribute associated to the request ornullif not available.- Type Parameters:
 T- the type of the attribute- Parameters:
 name- the name of the attribute- Returns:
 - the value of the attribute associated to the request
 
 - 
withClientRegistrationId
Returns a newOAuth2AuthorizeRequest.Builderinitialized with the identifier for theclient registration.- Parameters:
 clientRegistrationId- the identifier for theclient registration- Returns:
 - the 
OAuth2AuthorizeRequest.Builder 
 - 
withAuthorizedClient
public static OAuth2AuthorizeRequest.Builder withAuthorizedClient(OAuth2AuthorizedClient authorizedClient) Returns a newOAuth2AuthorizeRequest.Builderinitialized with theauthorized client.- Parameters:
 authorizedClient- theauthorized client- Returns:
 - the 
OAuth2AuthorizeRequest.Builder 
 
 -