public final class OAuth2AuthorizeRequest
extends java.lang.Object
OAuth2AuthorizedClientManager uses to
authorize (or
re-authorize) the client identified by the provided
clientRegistrationId.OAuth2AuthorizedClientManager| Modifier and Type | Class and Description |
|---|---|
static class |
OAuth2AuthorizeRequest.Builder
A builder for
OAuth2AuthorizeRequest. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttribute(java.lang.String name)
Returns the value of an attribute associated to the request or
null if not
available. |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns the attributes associated to the request.
|
OAuth2AuthorizedClient |
getAuthorizedClient()
Returns the
authorized client or null if it
was not provided. |
java.lang.String |
getClientRegistrationId()
Returns the identifier for the
client registration. |
Authentication |
getPrincipal()
Returns the
Principal (to be) associated to the authorized client. |
static OAuth2AuthorizeRequest.Builder |
withAuthorizedClient(OAuth2AuthorizedClient authorizedClient)
Returns a new
OAuth2AuthorizeRequest.Builder initialized with the authorized client. |
static OAuth2AuthorizeRequest.Builder |
withClientRegistrationId(java.lang.String clientRegistrationId)
Returns a new
OAuth2AuthorizeRequest.Builder initialized with the identifier for the
client registration. |
public java.lang.String getClientRegistrationId()
client registration.@Nullable public OAuth2AuthorizedClient getAuthorizedClient()
authorized client or null if it
was not provided.OAuth2AuthorizedClient or null if it was not providedpublic Authentication getPrincipal()
Principal (to be) associated to the authorized client.Principal (to be) associated to the authorized clientpublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Map of the attributes associated to the request@Nullable public <T> T getAttribute(java.lang.String name)
null if not
available.T - the type of the attributename - the name of the attributepublic static OAuth2AuthorizeRequest.Builder withClientRegistrationId(java.lang.String clientRegistrationId)
OAuth2AuthorizeRequest.Builder initialized with the identifier for the
client registration.clientRegistrationId - the identifier for the client
registrationOAuth2AuthorizeRequest.Builderpublic static OAuth2AuthorizeRequest.Builder withAuthorizedClient(OAuth2AuthorizedClient authorizedClient)
OAuth2AuthorizeRequest.Builder initialized with the authorized client.authorizedClient - the authorized clientOAuth2AuthorizeRequest.Builder