Class OAuth2AuthorizedClientProviderBuilder
java.lang.Object
org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder
A builder that builds a 
DelegatingOAuth2AuthorizedClientProvider composed of
 one or more OAuth2AuthorizedClientProvider(s) that implement specific
 authorization grants. The supported authorization grants are
 authorization_code, refresh_token
 and client_credentials. In addition to the standard
 authorization grants, an implementation of an extension grant may be supplied via
 provider(OAuth2AuthorizedClientProvider).- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classA builder for theauthorization_codegrant.final classA builder for theclient_credentialsgrant.final classA builder for therefresh_tokengrant. - 
Method Summary
Modifier and TypeMethodDescriptionConfigures support for theauthorization_codegrant.build()Builds an instance ofDelegatingOAuth2AuthorizedClientProvidercomposed of one or moreOAuth2AuthorizedClientProvider(s).builder()Returns a newOAuth2AuthorizedClientProviderBuilderfor configuring the supported authorization grant(s).Configures support for theclient_credentialsgrant.clientCredentials(Consumer<OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentialsgrant.provider(OAuth2AuthorizedClientProvider provider) Configures anOAuth2AuthorizedClientProviderto be composed with theDelegatingOAuth2AuthorizedClientProvider.Configures support for therefresh_tokengrant.refreshToken(Consumer<OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_tokengrant. 
- 
Method Details
- 
builder
Returns a newOAuth2AuthorizedClientProviderBuilderfor configuring the supported authorization grant(s).- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
provider
Configures anOAuth2AuthorizedClientProviderto be composed with theDelegatingOAuth2AuthorizedClientProvider. This may be used for implementations of extension authorization grants.- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
authorizationCode
Configures support for theauthorization_codegrant.- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
refreshToken
Configures support for therefresh_tokengrant.- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
refreshToken
public OAuth2AuthorizedClientProviderBuilder refreshToken(Consumer<OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_tokengrant.- Parameters:
 builderConsumer- aConsumerofOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilderused for further configuration- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
clientCredentials
Configures support for theclient_credentialsgrant.- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
clientCredentials
public OAuth2AuthorizedClientProviderBuilder clientCredentials(Consumer<OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentialsgrant.- Parameters:
 builderConsumer- aConsumerofOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilderused for further configuration- Returns:
 - the 
OAuth2AuthorizedClientProviderBuilder 
 - 
build
Builds an instance ofDelegatingOAuth2AuthorizedClientProvidercomposed of one or moreOAuth2AuthorizedClientProvider(s).- Returns:
 - the 
DelegatingOAuth2AuthorizedClientProvider 
 
 -