public final class OAuth2AuthorizedClientProviderBuilder
extends java.lang.Object
DelegatingOAuth2AuthorizedClientProvider
composed of
one or more OAuth2AuthorizedClientProvider
(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(OAuth2AuthorizedClientProvider)
.Modifier and Type | Class and Description |
---|---|
class |
OAuth2AuthorizedClientProviderBuilder.AuthorizationCodeGrantBuilder
A builder for the
authorization_code grant. |
class |
OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
A builder for the
client_credentials grant. |
class |
OAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
A builder for the
password grant. |
class |
OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
A builder for the
refresh_token grant. |
public static OAuth2AuthorizedClientProviderBuilder builder()
OAuth2AuthorizedClientProviderBuilder
for configuring the
supported authorization grant(s).OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder provider(OAuth2AuthorizedClientProvider provider)
OAuth2AuthorizedClientProvider
to be composed with the
DelegatingOAuth2AuthorizedClientProvider
. This may be used for
implementations of extension authorization grants.OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder authorizationCode()
authorization_code
grant.OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder refreshToken()
refresh_token
grant.OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder refreshToken(java.util.function.Consumer<OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder> builderConsumer)
refresh_token
grant.builderConsumer
- a Consumer
of OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
used
for further configurationOAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder clientCredentials()
client_credentials
grant.OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder clientCredentials(java.util.function.Consumer<OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder> builderConsumer)
client_credentials
grant.builderConsumer
- a Consumer
of OAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
used for further configurationOAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder password()
password
grant.OAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProviderBuilder password(java.util.function.Consumer<OAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder> builderConsumer)
password
grant.builderConsumer
- a Consumer
of OAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
used for
further configurationOAuth2AuthorizedClientProviderBuilder
public OAuth2AuthorizedClientProvider build()
DelegatingOAuth2AuthorizedClientProvider
composed of
one or more OAuth2AuthorizedClientProvider
(s).DelegatingOAuth2AuthorizedClientProvider