Skip to content

Commit

Permalink
Fix calculation of expiration timestamp
Browse files Browse the repository at this point in the history
`currentTimestamp` is in millis already which is why it should not be mulitplied by 1000.

This bug was introduced in bba32e0.
  • Loading branch information
mprausa committed Jul 30, 2024
1 parent c255396 commit 64d780c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public OicCredentials(

if (expiresInSeconds != null && expiresInSeconds > 0) {
long allowedClockSkewFixed = Util.fixNull(allowedClockSkewSeconds, 60L);
this.expiresAtMillis = (currentTimestamp + expiresInSeconds + allowedClockSkewFixed) * 1000;
this.expiresAtMillis = currentTimestamp + (expiresInSeconds + allowedClockSkewFixed) * 1000;
} else {
this.expiresAtMillis = null;
}
Expand Down

0 comments on commit 64d780c

Please sign in to comment.