Skip to content

Commit 7734d04

Browse files
committed
Polish javadoc gh-7511
1 parent d32c98b commit 7734d04

6 files changed

+24
-6
lines changed

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/ClientCredentialsOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ public void setAccessTokenResponseClient(OAuth2AccessTokenResponseClient<OAuth2C
108108
/**
109109
* Sets the maximum acceptable clock skew, which is used when checking the
110110
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
111-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
111+
*
112+
* <p>
113+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
114+
* is before the current time {@code clock#instant()}.
112115
*
113116
* @param clockSkew the maximum acceptable clock skew
114117
*/

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/ClientCredentialsReactiveOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ public void setAccessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient
101101
/**
102102
* Sets the maximum acceptable clock skew, which is used when checking the
103103
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
104-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
104+
*
105+
* <p>
106+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
107+
* is before the current time {@code clock#instant()}.
105108
*
106109
* @param clockSkew the maximum acceptable clock skew
107110
*/

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/PasswordOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ public void setAccessTokenResponseClient(OAuth2AccessTokenResponseClient<OAuth2P
126126
/**
127127
* Sets the maximum acceptable clock skew, which is used when checking the
128128
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
129-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
129+
*
130+
* <p>
131+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
132+
* is before the current time {@code clock#instant()}.
130133
*
131134
* @param clockSkew the maximum acceptable clock skew
132135
*/

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/PasswordReactiveOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ public void setAccessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient
121121
/**
122122
* Sets the maximum acceptable clock skew, which is used when checking the
123123
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
124-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
124+
*
125+
* <p>
126+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
127+
* is before the current time {@code clock#instant()}.
125128
*
126129
* @param clockSkew the maximum acceptable clock skew
127130
*/

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/RefreshTokenOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ public void setAccessTokenResponseClient(OAuth2AccessTokenResponseClient<OAuth2R
116116
/**
117117
* Sets the maximum acceptable clock skew, which is used when checking the
118118
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
119-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
119+
*
120+
* <p>
121+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
122+
* is before the current time {@code clock#instant()}.
120123
*
121124
* @param clockSkew the maximum acceptable clock skew
122125
*/

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/RefreshTokenReactiveOAuth2AuthorizedClientProvider.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ public void setAccessTokenResponseClient(ReactiveOAuth2AccessTokenResponseClient
112112
/**
113113
* Sets the maximum acceptable clock skew, which is used when checking the
114114
* {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is 60 seconds.
115-
* An access token is considered expired if it's before {@code Instant.now(this.clock) - clockSkew}.
115+
*
116+
* <p>
117+
* An access token is considered expired if {@code OAuth2AccessToken#getExpiresAt() - clockSkew}
118+
* is before the current time {@code clock#instant()}.
116119
*
117120
* @param clockSkew the maximum acceptable clock skew
118121
*/

0 commit comments

Comments
 (0)