Shiro 认证

v1.4.1
Parker 4 years ago
parent b5bce6c54b
commit 93d5460eef

@ -99,7 +99,8 @@ public class CustomShiroFilter extends AuthenticatingFilter {
try {
//处理登录失败的异常
Throwable throwable = e.getCause() == null ? e : e.getCause();
ResultVo<Object> error = ResultVo.error(401, throwable.getMessage());
ResultVo<Object> error = ResultVo.error(TokenMsg.EXCEPTION_TOKEN_LOSE_EFFICACY.getCode(),
TokenMsg.EXCEPTION_TOKEN_LOSE_EFFICACY.getMessage());
httpResponse.getWriter().print(error.toJsonStr());
} catch (IOException ignored) {}
return false;

Loading…
Cancel
Save