Class ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
- java.lang.Object
-
- org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
-
- Enclosing class:
- ReactiveOAuth2AuthorizedClientProviderBuilder
public final class ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder extends java.lang.Object
A builder for theclient_credentials
grant.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
accessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> accessTokenResponseClient)
Sets the client used when requesting an access token credential at the Token Endpoint.ReactiveOAuth2AuthorizedClientProvider
build()
Builds an instance ofClientCredentialsReactiveOAuth2AuthorizedClientProvider
.ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
clock(java.time.Clock clock)
Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
clockSkew(java.time.Duration clockSkew)
Sets the maximum acceptable clock skew, which is used when checking the access token expiry.
-
-
-
Method Detail
-
accessTokenResponseClient
public ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder accessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> accessTokenResponseClient)
Sets the client used when requesting an access token credential at the Token Endpoint.- Parameters:
accessTokenResponseClient
- the client used when requesting an access token credential at the Token Endpoint- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
-
clockSkew
public ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder clockSkew(java.time.Duration clockSkew)
Sets the maximum acceptable clock skew, which is used when checking the access token expiry. An access token is considered expired if it's beforeInstant.now(this.clock) - clockSkew
.- Parameters:
clockSkew
- the maximum acceptable clock skew- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
-
clock
public ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder clock(java.time.Clock clock)
Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.- Parameters:
clock
- the clock- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder.ClientCredentialsGrantBuilder
-
build
public ReactiveOAuth2AuthorizedClientProvider build()
Builds an instance ofClientCredentialsReactiveOAuth2AuthorizedClientProvider
.
-
-