|
|
|
@ -81,8 +81,9 @@ public class AuthFilter implements GlobalFilter, Ordered {
|
|
|
|
|
//判断 Token 状态
|
|
|
|
|
if (jwtProperties.getState()) { |
|
|
|
|
String tenantId = String.valueOf(claims.get(TokenConstant.TENANT_ID)); |
|
|
|
|
String clientId = String.valueOf(claims.get(TokenConstant.CLIENT_ID)); |
|
|
|
|
String userId = String.valueOf(claims.get(TokenConstant.USER_ID)); |
|
|
|
|
String accessToken = JwtUtil.getAccessToken(tenantId, userId, token); |
|
|
|
|
String accessToken = JwtUtil.getAccessToken(tenantId, clientId, userId, token); |
|
|
|
|
if (!token.equalsIgnoreCase(accessToken)) { |
|
|
|
|
return unAuth(resp, "令牌已失效"); |
|
|
|
|
} |
|
|
|
|