mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-24 01:21:03 +03:00
[ANY] Update JWT library (#706)
Co-authored-by: d3coder <admin@xakeps.dk>
(cherry picked from commit 3926f3e5bf
)
This commit is contained in:
parent
505eb347de
commit
de34b62036
6 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue