Fixed an integer overflow that caused the token to always be refreshed
This commit is contained in:
parent
4d8c3d7d73
commit
b52801de25
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ public class KeycloakInstalled {
|
|||
}
|
||||
|
||||
public String getTokenString(long minValidity, TimeUnit unit) throws VerificationException, IOException, ServerRequest.HttpFailure {
|
||||
long expires = token.getExpiration() * 1000 - unit.toMillis(minValidity);
|
||||
long expires = ((long) token.getExpiration()) * 1000 - unit.toMillis(minValidity);
|
||||
if (expires < System.currentTimeMillis()) {
|
||||
refreshToken();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue