mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
Fix refresh strategy
This commit is contained in:
@@ -20,6 +20,6 @@ public class PercentageJwtAccessTokenRefreshStrategy implements JwtAccessTokenRe
|
||||
public boolean shouldBeRefreshed(JwtAccessToken oldToken) {
|
||||
long liveSpan = oldToken.getExpiration().getTime() - oldToken.getIssuedAt().getTime();
|
||||
long age = clock.instant().toEpochMilli() - oldToken.getIssuedAt().getTime();
|
||||
return age/liveSpan > refreshPercentage;
|
||||
return (float)age/liveSpan > refreshPercentage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user