@Test public void decodeAccessToken() { DoubleJWT jwt = new DoubleJWT("secret", 10000, 20000); String token = jwt.generateAccessToken(1); assertNotNull(token); log.info(token); Map<String, Claim> claimMap = jwt.decodeAccessToken(token); assertEquals(LIN_SCOPE, claimMap.get("scope").asString()); assertEquals(ACCESS_TYPE, claimMap.get("type").asString()); }
public Map<String, Claim> decodeAccessToken(String token) { DecodedJWT jwt = accessVerifier.verify(token); checkTokenExpired(jwt.getExpiresAt()); checkTokenType(jwt.getClaim("type").asString(), ACCESS_TYPE); checkTokenScope(jwt.getClaim("scope").asString()); return jwt.getClaims(); }
DoubleJWT { public Map<String, Claim> decodeAccessToken(String token) { DecodedJWT jwt = accessVerifier.verify(token); checkTokenExpired(jwt.getExpiresAt()); checkTokenType(jwt.getClaim("type").asString(), ACCESS_TYPE); checkTokenScope(jwt.getClaim("scope").asString()); return jwt.getClaims(); } }
DoubleJWT { public Map<String, Claim> decodeAccessToken(String token) { DecodedJWT jwt = accessVerifier.verify(token); checkTokenExpired(jwt.getExpiresAt()); checkTokenType(jwt.getClaim("type").asString(), ACCESS_TYPE); checkTokenScope(jwt.getClaim("scope").asString()); return jwt.getClaims(); } DoubleJWT(Algorithm algorithm, long accessExpire, long refreshExpire);  DoubleJWT(String secret, long accessExpire, long refreshExpire); }
DoubleJWT { public Map<String, Claim> decodeAccessToken(String token) { DecodedJWT jwt = accessVerifier.verify(token); checkTokenExpired(jwt.getExpiresAt()); checkTokenType(jwt.getClaim("type").asString(), ACCESS_TYPE); checkTokenScope(jwt.getClaim("scope").asString()); return jwt.getClaims(); } DoubleJWT(Algorithm algorithm, long accessExpire, long refreshExpire);  DoubleJWT(String secret, long accessExpire, long refreshExpire); String generateToken(String tokenType, long identity, String scope, long expire); Map<String, Claim> decodeAccessToken(String token); Map<String, Claim> decodeRefreshToken(String token); String generateAccessToken(long identity); String generateRefreshToken(long identity); Tokens generateTokens(long identity); JWTVerifier getAccessVerifier(); JWTVerifier getRefreshVerifier(); JWTCreator.Builder getBuilder(); Algorithm getAlgorithm(); Long getAccessExpire(); Long getRefreshExpire(); }
DoubleJWT { public Map<String, Claim> decodeAccessToken(String token) { DecodedJWT jwt = accessVerifier.verify(token); checkTokenExpired(jwt.getExpiresAt()); checkTokenType(jwt.getClaim("type").asString(), ACCESS_TYPE); checkTokenScope(jwt.getClaim("scope").asString()); return jwt.getClaims(); } DoubleJWT(Algorithm algorithm, long accessExpire, long refreshExpire);  DoubleJWT(String secret, long accessExpire, long refreshExpire); String generateToken(String tokenType, long identity, String scope, long expire); Map<String, Claim> decodeAccessToken(String token); Map<String, Claim> decodeRefreshToken(String token); String generateAccessToken(long identity); String generateRefreshToken(long identity); Tokens generateTokens(long identity); JWTVerifier getAccessVerifier(); JWTVerifier getRefreshVerifier(); JWTCreator.Builder getBuilder(); Algorithm getAlgorithm(); Long getAccessExpire(); Long getRefreshExpire();  }