forked from github/dataease
perf(登录): 及时删除废弃的token缓存
This commit is contained in:
parent
a35d01c42c
commit
699aafaf30
@ -71,9 +71,11 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
|
||||
}
|
||||
// 当没有出现登录超时 且需要刷新token 则执行刷新token
|
||||
if (JWTUtils.loginExpire(authorization)) {
|
||||
TokenCacheUtils.remove(authorization);
|
||||
throw new AuthenticationException(expireMessage);
|
||||
}
|
||||
if (JWTUtils.needRefresh(authorization)) {
|
||||
TokenCacheUtils.remove(authorization);
|
||||
authorization = refreshToken(request, response);
|
||||
}
|
||||
JWTToken token = new JWTToken(authorization);
|
||||
|
Loading…
Reference in New Issue
Block a user