Class ClientRegistration
java.lang.Object
org.springframework.security.oauth2.client.registration.ClientRegistration
- All Implemented Interfaces:
- Serializable
A representation of a client registration with an OAuth 2.0 or OpenID Connect 1.0
 Provider.
- Since:
- 5.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA builder forClientRegistration.static final classA facility for client configuration settings.classDetails of the Provider.
- 
Method SummaryModifier and TypeMethodDescriptionReturns theauthorization grant typeused for the client.Returns theauthentication methodused when authenticating the client with the authorization server.Returns the client identifier.Returns the logical name of the client or registration.Returns the client secret.Returns theclient configuration settings.Returns the details of the provider.Returns the uri (or uri template) for the redirection endpoint.Returns the identifier for the registration.Returns the scope(s) used for the client.toString()static ClientRegistration.BuilderwithClientRegistration(ClientRegistration clientRegistration) Returns a newClientRegistration.Builder, initialized with the providedClientRegistration.static ClientRegistration.BuilderwithRegistrationId(String registrationId) Returns a newClientRegistration.Builder, initialized with the provided registration identifier.
- 
Method Details- 
getRegistrationIdReturns the identifier for the registration.- Returns:
- the identifier for the registration
 
- 
getClientIdReturns the client identifier.- Returns:
- the client identifier
 
- 
getClientSecretReturns the client secret.- Returns:
- the client secret
 
- 
getClientAuthenticationMethodReturns theauthentication methodused when authenticating the client with the authorization server.- Returns:
- the ClientAuthenticationMethod
 
- 
getAuthorizationGrantTypeReturns theauthorization grant typeused for the client.- Returns:
- the AuthorizationGrantType
 
- 
getRedirectUriReturns the uri (or uri template) for the redirection endpoint.
 The supported uri template variables are: {baseScheme}, {baseHost}, {basePort}, {basePath} and {registrationId}.
 NOTE: {baseUrl} is also supported, which is the same as {baseScheme}://{baseHost}{basePort}{basePath}.
 Configuring uri template variables is especially useful when the client is running behind a Proxy Server. This ensures that the X-Forwarded-* headers are used when expanding the redirect-uri.- Returns:
- the uri (or uri template) for the redirection endpoint
- Since:
- 5.4
 
- 
getScopesReturns the scope(s) used for the client.- Returns:
- the Setof scope(s)
 
- 
getProviderDetailsReturns the details of the provider.- Returns:
- the ClientRegistration.ProviderDetails
 
- 
getClientNameReturns the logical name of the client or registration.- Returns:
- the client or registration name
 
- 
getClientSettingsReturns theclient configuration settings.- Returns:
- the ClientRegistration.ClientSettings
 
- 
toString
- 
withRegistrationIdReturns a newClientRegistration.Builder, initialized with the provided registration identifier.- Parameters:
- registrationId- the identifier for the registration
- Returns:
- the ClientRegistration.Builder
 
- 
withClientRegistrationpublic static ClientRegistration.Builder withClientRegistration(ClientRegistration clientRegistration) Returns a newClientRegistration.Builder, initialized with the providedClientRegistration.- Parameters:
- clientRegistration- the- ClientRegistrationto copy from
- Returns:
- the ClientRegistration.Builder
 
 
-