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
,
client_credentials
and password
. In
addition to the standard authorization grants, an implementation of an extension grant
may be supplied via provider(ReactiveOAuth2AuthorizedClientProvider)
.- Since:
- 5.2
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionfinal class
A builder for theauthorization_code
grant.final class
A builder for theclient_credentials
grant.final class
A builder for thepassword
grant.final class
A builder for therefresh_token
grant. -
Method Summary
Modifier and TypeMethodDescriptionConfigures support for theauthorization_code
grant.build()
Builds an instance ofDelegatingReactiveOAuth2AuthorizedClientProvider
composed of one or moreReactiveOAuth2AuthorizedClientProvider
(s).builder()
Returns a newReactiveOAuth2AuthorizedClientProviderBuilder
for configuring the supported authorization grant(s).Configures support for theclient_credentials
grant.clientCredentials
(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentials
grant.password()
Configures support for thepassword
grant.password
(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder> builderConsumer) Configures support for thepassword
grant.Configures aReactiveOAuth2AuthorizedClientProvider
to be composed with theDelegatingReactiveOAuth2AuthorizedClientProvider
.Configures support for therefresh_token
grant.refreshToken
(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_token
grant.
-
Method Details
-
builder
Returns a newReactiveOAuth2AuthorizedClientProviderBuilder
for configuring the supported authorization grant(s).- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
provider
public ReactiveOAuth2AuthorizedClientProviderBuilder provider(ReactiveOAuth2AuthorizedClientProvider provider) Configures aReactiveOAuth2AuthorizedClientProvider
to be composed with theDelegatingReactiveOAuth2AuthorizedClientProvider
. This may be used for implementations of extension authorization grants.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
authorizationCode
Configures support for theauthorization_code
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
Configures support for therefresh_token
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
public ReactiveOAuth2AuthorizedClientProviderBuilder refreshToken(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer) Configures support for therefresh_token
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
Configures support for theclient_credentials
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
public ReactiveOAuth2AuthorizedClientProviderBuilder clientCredentials(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer) Configures support for theclient_credentials
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
password
Configures support for thepassword
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
password
public ReactiveOAuth2AuthorizedClientProviderBuilder password(Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder> builderConsumer) Configures support for thepassword
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
build
Builds an instance ofDelegatingReactiveOAuth2AuthorizedClientProvider
composed of one or moreReactiveOAuth2AuthorizedClientProvider
(s).- Returns:
- the
DelegatingReactiveOAuth2AuthorizedClientProvider
-