Class ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
java.lang.Object
org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
- Enclosing class:
- ReactiveOAuth2AuthorizedClientProviderBuilder
public final class ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
extends Object
A builder for the
password
grant.-
Method Summary
Modifier and TypeMethodDescriptionaccessTokenResponseClient
(ReactiveOAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest> accessTokenResponseClient) Sets the client used when requesting an access token credential at the Token Endpoint.build()
Builds an instance ofPasswordReactiveOAuth2AuthorizedClientProvider
.Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.Sets the maximum acceptable clock skew, which is used when checking the access token expiry.
-
Method Details
-
accessTokenResponseClient
public ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder accessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest> 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.PasswordGrantBuilder
-
clockSkew
public ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder clockSkew(Duration clockSkew) Sets the maximum acceptable clock skew, which is used when checking the access token expiry. An access token is considered expired ifOAuth2Token#getExpiresAt() - clockSkew
is before the current timeclock#instant()
.- Parameters:
clockSkew
- the maximum acceptable clock skew- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
- See Also:
-
clock
Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.- Parameters:
clock
- the clock- Returns:
- the
ReactiveOAuth2AuthorizedClientProviderBuilder.PasswordGrantBuilder
-
build
Builds an instance ofPasswordReactiveOAuth2AuthorizedClientProvider
.- Returns:
- the
PasswordReactiveOAuth2AuthorizedClientProvider
-