diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java index 83ce07e2..0e3244e3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java @@ -132,7 +132,7 @@ public static class HardwareInfoTokenVerifier implements RestoreResponse.Extende private final JwtParser parser; public HardwareInfoTokenVerifier(LaunchServer server) { - this.parser = Jwts.parserBuilder() + this.parser = Jwts.parser() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .build(); @@ -164,7 +164,7 @@ public static class PublicKeyTokenVerifier implements RestoreResponse.ExtendedTo private final JwtParser parser; public PublicKeyTokenVerifier(LaunchServer server) { - this.parser = Jwts.parserBuilder() + this.parser = Jwts.parser() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .build(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index f6090469..3c0f7c52 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -18,7 +18,7 @@ public TokenCommand(LaunchServer server) { @Override public void invoke(String... args) throws Exception { verifyArgs(args, 1); - var parser = Jwts.parserBuilder().setSigningKey(server.keyAgreementManager.ecdsaPublicKey).build(); + var parser = Jwts.parser().setSigningKey(server.keyAgreementManager.ecdsaPublicKey).build(); var claims = parser.parseClaimsJws(args[0]); logger.info("Token: {}", claims.getBody()); } 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 9b4acb45..764a7208 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java @@ -25,7 +25,7 @@ public static String makeAccessJwtTokenFromString(User user, LocalDateTime expir } public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey publicKey) { - var parser = Jwts.parserBuilder() + var parser = Jwts.parser() .requireIssuer("LaunchServer") .setClock(() -> new Date(Clock.systemUTC().millis())) .setSigningKey(publicKey) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index 5b7c3c21..e774769a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -38,7 +38,7 @@ public class AuthManager { public AuthManager(LaunchServer server) { this.server = server; - this.checkServerTokenParser = Jwts.parserBuilder() + this.checkServerTokenParser = Jwts.parser() .requireIssuer("LaunchServer") .require("tokenType", "checkServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index 8849c61a..9a771986 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -89,7 +89,7 @@ public static class LauncherTokenVerifier implements RestoreResponse.ExtendedTok private final Logger logger = LogManager.getLogger(); public LauncherTokenVerifier(LaunchServer server) { - parser = Jwts.parserBuilder() + parser = Jwts.parser() .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .requireIssuer("LaunchServer") .build(); diff --git a/props.gradle b/props.gradle index 30ea7931..1c40bced 100644 --- a/props.gradle +++ b/props.gradle @@ -6,7 +6,7 @@ verGuavaC = '30.1.1-jre' verJansi = '2.4.1' verJline = '3.25.0' - verJwt = '0.11.5' + verJwt = '0.12.5' verBcprov = '1.70' verGson = '2.10.1' verBcpkix = '1.70'