You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ public class Console {
139
139
}
140
140
```
141
141
142
-
> Token refresh note: `getAccessToken()` (or `getAccessToken(false)`) returns the cached token while valid. Call `getAccessToken(true)` to bypass the cache and force retrieval of a new token.
142
+
> Token refresh note: `getAccessToken()` (or `getAccessToken(false)`) returns the cached token while valid. Call `getAccessToken(true)` to bypass the cache and force retrieval of a new token. (See [Access Token Proactive Expiry Offset](#access-token-proactive-expiry-offset) for details on token expiry handling.)
143
143
144
144
### Configure a Proxy
145
145
@@ -187,16 +187,16 @@ The `ConfidentialClient` refreshes access tokens proactively before their actual
187
187
Default behaviour:
188
188
- A 30 second (30,000 ms) proactive offset is applied automatically.
189
189
- Calls to `getAccessToken()` (or `getAccessToken(false)`) reuse the cached token while it is still considered valid under this adjusted expiry.
190
-
-`getAccessToken(true)`always forces a fresh token (bypasses cache).
190
+
-`getAccessToken(true)` forces a fresh token unless one was very recently refreshed (within 5 seconds) to avoid unnecessary duplicate requests from concurrent threads.
191
191
192
192
You can override the proactive offset by configuring it in `RequestOptions`:
0 commit comments