xuhy
2025-01-08 02d5b44343f3bd9abb667e50ccf469fed9a0a99a
common/src/main/java/com/jilongda/common/security/JwtTokenUtils.java
@@ -214,7 +214,7 @@
    public static Boolean validateToken(String token, String username) {
        String userName = getUsername(token);
        if (!StringUtils.hasLength(userName)) {
            throw new IllegalArgumentException("请求令牌无效");
            throw new ServiceException(401,"请求令牌无效");
        }
        return (userName.equals(username) && !isTokenExpired(token));
    }
@@ -302,7 +302,7 @@
        try {
            token = new String(Base64Utils.decode(token.getBytes()));
        } catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("无效的令牌");
            throw new ServiceException(401,"无效的令牌");
        }
        return token;
    }