From f6ee175acdbb7a7348de8c0ed63b15afe513d62b Mon Sep 17 00:00:00 2001 From: Gravita Date: Fri, 18 Mar 2022 19:54:56 +0700 Subject: [PATCH] [FIX] UTC Clock --- .../pro/gravit/launchserver/helper/LegacySessionHelper.java | 2 ++ 1 file changed, 2 insertions(+) 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);