Class OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
- java.lang.Object
-
- org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
-
- Enclosing class:
- OAuth2AuthorizedClientProviderBuilder
public class OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder extends java.lang.Object
A builder for therefresh_token
grant.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
accessTokenResponseClient(OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest> accessTokenResponseClient)
Sets the client used when requesting an access token credential at the Token Endpoint.OAuth2AuthorizedClientProvider
build()
Builds an instance ofRefreshTokenOAuth2AuthorizedClientProvider
.OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
clock(java.time.Clock clock)
Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
clockSkew(java.time.Duration clockSkew)
Sets the maximum acceptable clock skew, which is used when checking the access token expiry.
-
-
-
Method Detail
-
accessTokenResponseClient
public OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder accessTokenResponseClient(OAuth2AccessTokenResponseClient<OAuth2RefreshTokenGrantRequest> 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
OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
-
clockSkew
public OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder 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
OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
-
clock
public OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder clock(java.time.Clock clock)
Sets theClock
used inInstant.now(Clock)
when checking the access token expiry.- Parameters:
clock
- the clock- Returns:
- the
OAuth2AuthorizedClientProviderBuilder.RefreshTokenGrantBuilder
-
build
public OAuth2AuthorizedClientProvider build()
Builds an instance ofRefreshTokenOAuth2AuthorizedClientProvider
.- Returns:
- the
RefreshTokenOAuth2AuthorizedClientProvider
-
-