use of com.topcom.cms.perm.token.verifier.MACVerifierExtended in project topcom-cloud by 545314690.
the class TokenManager method validateToken.
default boolean validateToken(String token) {
if (token == null) {
return false;
}
try {
SignedJWT signed = SignedJWT.parse(token);
JWSVerifier verifier = new MACVerifierExtended(getSharedKey(), signed.getJWTClaimsSet());
return signed.verify(verifier);
} catch (ParseException ex) {
return false;
} catch (JOSEException ex) {
return false;
}
}
Aggregations