This commit is contained in:
2025-01-16 18:28:04 +08:00
parent 0bba613001
commit bbcbdd2839
24 changed files with 436 additions and 111 deletions

View File

@@ -75,10 +75,10 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
JwtInfo jwtInfo;
try {
jwtInfo = JwtTokenUtil.parsingToken(token);
LocalDateTime expireTime = jwtInfo.getExpireTime();
if (LocalDateTime.now(ZoneId.systemDefault()).isAfter(expireTime)) {
throw new TokenExpireException("token过期");
}
// LocalDateTime expireTime = jwtInfo.getExpireTime();
// if (LocalDateTime.now(ZoneId.systemDefault()).isAfter(expireTime)) {
// throw new TokenExpireException("token过期");
// }
BaseContextHandler.setToken(token);
BaseContextHandler.setName(jwtInfo.getName());
BaseContextHandler.setUserId(String.valueOf(jwtInfo.getUserId()));