|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2019 the original author or authors. |
| 2 | + * Copyright 2002-2021 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -225,10 +225,12 @@ public ClientCredentialsGrantBuilder accessTokenResponseClient(
|
225 | 225 |
|
226 | 226 | /**
|
227 | 227 | * Sets the maximum acceptable clock skew, which is used when checking the access
|
228 |
| - * token expiry. An access token is considered expired if it's before |
229 |
| - * {@code Instant.now(this.clock) - clockSkew}. |
| 228 | + * token expiry. An access token is considered expired if |
| 229 | + * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time |
| 230 | + * {@code clock#instant()}. |
230 | 231 | * @param clockSkew the maximum acceptable clock skew
|
231 | 232 | * @return the {@link ClientCredentialsGrantBuilder}
|
| 233 | + * @see ClientCredentialsReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration) |
232 | 234 | */
|
233 | 235 | public ClientCredentialsGrantBuilder clockSkew(Duration clockSkew) {
|
234 | 236 | this.clockSkew = clockSkew;
|
@@ -297,10 +299,12 @@ public PasswordGrantBuilder accessTokenResponseClient(
|
297 | 299 |
|
298 | 300 | /**
|
299 | 301 | * Sets the maximum acceptable clock skew, which is used when checking the access
|
300 |
| - * token expiry. An access token is considered expired if it's before |
301 |
| - * {@code Instant.now(this.clock) - clockSkew}. |
| 302 | + * token expiry. An access token is considered expired if |
| 303 | + * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time |
| 304 | + * {@code clock#instant()}. |
302 | 305 | * @param clockSkew the maximum acceptable clock skew
|
303 | 306 | * @return the {@link PasswordGrantBuilder}
|
| 307 | + * @see PasswordReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration) |
304 | 308 | */
|
305 | 309 | public PasswordGrantBuilder clockSkew(Duration clockSkew) {
|
306 | 310 | this.clockSkew = clockSkew;
|
@@ -368,10 +372,12 @@ public RefreshTokenGrantBuilder accessTokenResponseClient(
|
368 | 372 |
|
369 | 373 | /**
|
370 | 374 | * Sets the maximum acceptable clock skew, which is used when checking the access
|
371 |
| - * token expiry. An access token is considered expired if it's before |
372 |
| - * {@code Instant.now(this.clock) - clockSkew}. |
| 375 | + * token expiry. An access token is considered expired if |
| 376 | + * {@code OAuth2Token#getExpiresAt() - clockSkew} is before the current time |
| 377 | + * {@code clock#instant()}. |
373 | 378 | * @param clockSkew the maximum acceptable clock skew
|
374 | 379 | * @return the {@link RefreshTokenGrantBuilder}
|
| 380 | + * @see RefreshTokenReactiveOAuth2AuthorizedClientProvider#setClockSkew(Duration) |
375 | 381 | */
|
376 | 382 | public RefreshTokenGrantBuilder clockSkew(Duration clockSkew) {
|
377 | 383 | this.clockSkew = clockSkew;
|
|
0 commit comments