diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java index 092cf99f..c81eaf8a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java @@ -6,6 +6,7 @@ import java.security.interfaces.ECPrivateKey; import java.security.interfaces.ECPublicKey; +import java.time.Clock; import java.time.Duration; import java.time.LocalDateTime; import java.time.ZoneOffset; @@ -27,6 +28,7 @@ public static String makeAccessJwtTokenFromString(User user, LocalDateTime expir public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey publicKey) { var parser = Jwts.parserBuilder() .requireIssuer("LaunchServer") + .setClock(() -> new Date(Clock.systemUTC().millis())) .setSigningKey(publicKey) .build(); var claims = parser.parseClaimsJws(token);