mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] UTC Clock
This commit is contained in:
parent
736bf51eaa
commit
f6ee175acd
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue