mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 09:35:29 +08:00
临时打开登陆
This commit is contained in:
parent
5333d94f44
commit
a1aaa31611
@ -46,6 +46,9 @@ public class AuthFilter {
|
||||
ServerHttpRequest request = SaReactorSyncHolder.getContext().getRequest();
|
||||
// 检查是否登录 是否有token
|
||||
try {
|
||||
// if (!StpUtil.isLogin()) {
|
||||
// StpUtil.login(1);
|
||||
// }
|
||||
StpUtil.checkLogin();
|
||||
} catch (NotLoginException e) {
|
||||
if (request.getURI().getPath().contains("sse")) {
|
||||
@ -73,8 +76,8 @@ public class AuthFilter {
|
||||
// }
|
||||
});
|
||||
}).setError(e -> {
|
||||
log.error("认证错误", e);
|
||||
if (e instanceof NotLoginException) {
|
||||
log.error("认证错误", e);
|
||||
if (e instanceof NotLoginException) {
|
||||
return SaResult.error(e.getMessage()).setCode(HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
return SaResult.error("认证失败,无法访问系统资源").setCode(HttpStatus.UNAUTHORIZED);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user