|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2002-2019 the original author or authors.
|
|
|
+ * Copyright 2002-2021 the original author or authors.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -225,10 +225,12 @@ public final class ReactiveOAuth2AuthorizedClientProviderBuilder {
|
|
|
|
|
|
/**
|
|
|
* Sets the maximum acceptable clock skew, which is used when checking the access
|
|
|
- * token expiry. An access token is considered expired if it's before
|
|
|
- * {@code Instant.now(this.clock) - clockSkew}.
|
|
|
+ * token expiry. An access token is considered expired if
|
|
|
+ * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time
|
|
|
+ * {@code clock#instant()}.
|
|
|
* @param clockSkew the maximum acceptable clock skew
|
|
|
* @return the {@link ClientCredentialsGrantBuilder}
|
|
|
+ * @see ClientCredentialsReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration)
|
|
|
*/
|
|
|
public ClientCredentialsGrantBuilder clockSkew(Duration clockSkew) {
|
|
|
this.clockSkew = clockSkew;
|
|
@@ -297,10 +299,12 @@ public final class ReactiveOAuth2AuthorizedClientProviderBuilder {
|
|
|
|
|
|
/**
|
|
|
* Sets the maximum acceptable clock skew, which is used when checking the access
|
|
|
- * token expiry. An access token is considered expired if it's before
|
|
|
- * {@code Instant.now(this.clock) - clockSkew}.
|
|
|
+ * token expiry. An access token is considered expired if
|
|
|
+ * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time
|
|
|
+ * {@code clock#instant()}.
|
|
|
* @param clockSkew the maximum acceptable clock skew
|
|
|
* @return the {@link PasswordGrantBuilder}
|
|
|
+ * @see PasswordReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration)
|
|
|
*/
|
|
|
public PasswordGrantBuilder clockSkew(Duration clockSkew) {
|
|
|
this.clockSkew = clockSkew;
|
|
@@ -368,10 +372,12 @@ public final class ReactiveOAuth2AuthorizedClientProviderBuilder {
|
|
|
|
|
|
/**
|
|
|
* Sets the maximum acceptable clock skew, which is used when checking the access
|
|
|
- * token expiry. An access token is considered expired if it's before
|
|
|
- * {@code Instant.now(this.clock) - clockSkew}.
|
|
|
+ * token expiry. An access token is considered expired if
|
|
|
+ * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time
|
|
|
+ * {@code clock#instant()}.
|
|
|
* @param clockSkew the maximum acceptable clock skew
|
|
|
* @return the {@link RefreshTokenGrantBuilder}
|
|
|
+ * @see RefreshTokenReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration)
|
|
|
*/
|
|
|
public RefreshTokenGrantBuilder clockSkew(Duration clockSkew) {
|
|
|
this.clockSkew = clockSkew;
|