|
|
|
@ -29,7 +29,6 @@ public class JWTManager { |
|
|
|
|
header.put("alg", "HS256"); |
|
|
|
|
header.put("typ", "JWT"); |
|
|
|
|
|
|
|
|
|
LocalDate now = LocalDate.now(); |
|
|
|
|
Map<String, Object> payload = new HashMap<>(); |
|
|
|
|
payload.put("user", user); |
|
|
|
|
payload.put("api_ver", "1"); |
|
|
|
@ -52,8 +51,6 @@ public class JWTManager { |
|
|
|
|
.setSigningKey(key) |
|
|
|
|
.build() |
|
|
|
|
.parseClaimsJws(token); |
|
|
|
|
|
|
|
|
|
System.out.println(jws); |
|
|
|
|
} catch (JwtException e) { |
|
|
|
|
System.err.println("Error: token is wrong: " + e.getMessage()); |
|
|
|
|
return false; |
|
|
|
|