Search in sources :

Example 1 with Algorithm

use of com.auth0.jwt.algorithms.Algorithm in project libresonic by Libresonic.

the class JWTSecurityService method verify.

public static DecodedJWT verify(String jwtKey, String token) {
    Algorithm algorithm = JWTSecurityService.getAlgorithm(jwtKey);
    JWTVerifier verifier = JWT.require(algorithm).build();
    return verifier.verify(token);
}
Also used : Algorithm(com.auth0.jwt.algorithms.Algorithm) JWTVerifier(com.auth0.jwt.JWTVerifier)

Aggregations

JWTVerifier (com.auth0.jwt.JWTVerifier)1 Algorithm (com.auth0.jwt.algorithms.Algorithm)1