Class ReactiveOAuth2AuthorizedClientProviderBuilder
java.lang.Object
org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder
A builder that builds a
DelegatingReactiveOAuth2AuthorizedClientProvider
composed of one or more ReactiveOAuth2AuthorizedClientProvider(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(ReactiveOAuth2AuthorizedClientProvider).-
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 ofDelegatingReactiveOAuth2AuthorizedClientProvidercomposed of one or moreReactiveOAuth2AuthorizedClientProvider(s).builder()Returns a newReactiveOAuth2AuthorizedClientProviderBuilderfor configuring the supported authorization grant(s).Configures support for theclient_credentialsgrant.clientCredentials(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentialsgrant.Configures aReactiveOAuth2AuthorizedClientProviderto be composed with theDelegatingReactiveOAuth2AuthorizedClientProvider.Configures support for therefresh_tokengrant.refreshToken(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_tokengrant.
-
Method Details
-
builder
Returns a newReactiveOAuth2AuthorizedClientProviderBuilderfor configuring the supported authorization grant(s).- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
provider
public ReactiveOAuth2AuthorizedClientProviderBuilder provider(ReactiveOAuth2AuthorizedClientProvider provider) Configures aReactiveOAuth2AuthorizedClientProviderto be composed with theDelegatingReactiveOAuth2AuthorizedClientProvider. This may be used for implementations of extension authorization grants.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
authorizationCode
Configures support for theauthorization_codegrant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
Configures support for therefresh_tokengrant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
public ReactiveOAuth2AuthorizedClientProviderBuilder refreshToken(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_tokengrant.- Parameters:
builderConsumer- aConsumerofReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilderused for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
Configures support for theclient_credentialsgrant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
public ReactiveOAuth2AuthorizedClientProviderBuilder clientCredentials(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentialsgrant.- Parameters:
builderConsumer- aConsumerofReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilderused for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
build
Builds an instance ofDelegatingReactiveOAuth2AuthorizedClientProvidercomposed of one or moreReactiveOAuth2AuthorizedClientProvider(s).- Returns:
- the
DelegatingReactiveOAuth2AuthorizedClientProvider
-