Skip to content

Commit

Permalink
Update PrivacyIDEA.java
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmatusiewicz committed Dec 31, 2024
1 parent 01eb016 commit 1e23c86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/privacyidea/PrivacyIDEA.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ private void retrieveAuthToken()
LinkedHashMap<String, String> authTokenMap = parser.extractAuthToken(response);
this.authToken = authTokenMap.get(AUTH_TOKEN);
int authTokenExp = Integer.parseInt(authTokenMap.get(AUTH_TOKEN_EXP));
log("Auth token expires in: " + (authTokenExp - System.currentTimeMillis() / 1000L) + " seconds.");

// Schedule the next token retrieval to 1 min before expiration
long delay = authTokenExp - 60 - System.currentTimeMillis() / 1000L;
Expand Down

0 comments on commit 1e23c86

Please sign in to comment.