Fixed an integer overflow that caused the token to always be refreshed
This commit is contained in:
1 parent
4d8c3d7d73
commit
b52801de25
1 file changed
+1
-1
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user