Class ReactiveOAuth2AuthorizedClientProviderBuilder
- java.lang.Object
-
- org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder
-
public final class ReactiveOAuth2AuthorizedClientProviderBuilder extends java.lang.Object
A builder that builds aDelegatingReactiveOAuth2AuthorizedClientProvider
composed of one or moreReactiveOAuth2AuthorizedClientProvider
(s) that implement specific authorization grants. The supported authorization grants areauthorization_code
,refresh_token
,client_credentials
andpassword
. In addition to the standard authorization grants, an implementation of an extension grant may be supplied viaprovider(ReactiveOAuth2AuthorizedClientProvider)
.- Since:
- 5.2
- See Also:
ReactiveOAuth2AuthorizedClientProvider
,AuthorizationCodeReactiveOAuth2AuthorizedClientProvider
,RefreshTokenReactiveOAuth2AuthorizedClientProvider
,ClientCredentialsReactiveOAuth2AuthorizedClientProvider
,PasswordReactiveOAuth2AuthorizedClientProvider
,DelegatingReactiveOAuth2AuthorizedClientProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ReactiveOAuth2AuthorizedClientProviderBuilder.AuthorizationCodeGrantBuilder
A builder for theauthorization_code
grant.class
ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
A builder for theclient_credentials
grant.class
ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
A builder for thepassword
grant.class
ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
A builder for therefresh_token
grant.
-
Method Summary
-
-
-
Method Detail
-
builder
public static ReactiveOAuth2AuthorizedClientProviderBuilder 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
public ReactiveOAuth2AuthorizedClientProviderBuilder authorizationCode()
Configures support for theauthorization_code
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
public ReactiveOAuth2AuthorizedClientProviderBuilder refreshToken()
Configures support for therefresh_token
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
refreshToken
public ReactiveOAuth2AuthorizedClientProviderBuilder refreshToken(java.util.function.Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer)
Configures support for therefresh_token
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
public ReactiveOAuth2AuthorizedClientProviderBuilder clientCredentials()
Configures support for theclient_credentials
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
clientCredentials
public ReactiveOAuth2AuthorizedClientProviderBuilder clientCredentials(java.util.function.Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer)
Configures support for theclient_credentials
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
password
public ReactiveOAuth2AuthorizedClientProviderBuilder password()
Configures support for thepassword
grant.- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
password
public ReactiveOAuth2AuthorizedClientProviderBuilder password(java.util.function.Consumer<ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder> builderConsumer)
Configures support for thepassword
grant.- Parameters:
builderConsumer
- aConsumer
ofReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
used for further configuration- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder
-
build
public ReactiveOAuth2AuthorizedClientProvider build()
Builds an instance ofDelegatingReactiveOAuth2AuthorizedClientProvider
composed of one or moreReactiveOAuth2AuthorizedClientProvider
(s).- Returns:
- the
DelegatingReactiveOAuth2AuthorizedClientProvider
-
-