update 过滤离线用户
This commit is contained in:
parent
2cd2e6dd19
commit
da247c61b7
@ -48,7 +48,6 @@ public class SysUserOnlineController extends BaseController {
|
||||
for (String key : keys) {
|
||||
// 如果已经过期则踢下线
|
||||
if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(key) < 0) {
|
||||
StpUtil.kickoutByTokenValue(key);
|
||||
continue;
|
||||
}
|
||||
String onlineKey = key.replace(Constants.LOGIN_TOKEN_KEY, Constants.ONLINE_TOKEN_KEY);
|
||||
|
@ -59,8 +59,6 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(NotLoginException.class)
|
||||
public AjaxResult<Void> handleAccessDeniedException(NotLoginException e, HttpServletRequest request) {
|
||||
String requestURI = request.getRequestURI();
|
||||
String token = e.getMessage().split(":")[1];
|
||||
StpUtil.kickoutByTokenValue(token);
|
||||
log.error("请求地址'{}',认证失败'{}',无法访问系统资源", requestURI, e.getMessage());
|
||||
return AjaxResult.error(HttpStatus.HTTP_UNAUTHORIZED, StringUtils.format("请求地址'{}',认证失败'{}',无法访问系统资源", requestURI));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user