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