Commit 758ea739 authored by zengtianlai3's avatar zengtianlai3

抛出jwt解码异常信息

parent 668fa3ad
......@@ -66,7 +66,13 @@ public class JwtUtil {
*/
public static DecodedJWT verifyToken(String token) {
JWTVerifier verifier = JWT.require(Algorithm.HMAC256(SECRET)).build();
DecodedJWT jwt = verifier.verify(token);
DecodedJWT jwt = null;
try {
jwt = verifier.verify(token);
} catch ( RuntimeException e) {
log.error(e.getMessage());
log.error("解析编码异常");
}
return jwt;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment