Skip to content

Commit

Permalink
OKTA-812920: Fix issue with token refresh #1563 (#1577)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindkrishnakumar-okta authored Nov 14, 2024
1 parent ddd54bd commit fa6ad67
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public synchronized void applyToParams(List<Pair> queryParams, Map<String, Strin
if (oAuth2AccessToken != null &&
// refresh 5 minutes before token expiration
oAuth2AccessToken.getExpiresAt().minus(5, ChronoUnit.MINUTES).isBefore(Instant.now())) {
oAuth2AccessToken = null;
setAccessToken(null);
refreshOAuth2AccessToken();
}
super.applyToParams(queryParams, headerParams, cookieParams);
Expand Down

0 comments on commit fa6ad67

Please sign in to comment.