mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
将全局过滤器的 BeforeAuth 认证设为不受 includeList 与 excludeList 的限制,所有请求都会进入
This commit is contained in:
parent
3a84c3d51e
commit
68e99f232e
@ -123,11 +123,12 @@ public class SaTokenFilter implements SaFilter, Filter { //之所以改名,为
|
||||
Handler mainHandler = Solon.app().router().matchMain(ctx);
|
||||
Action action = (mainHandler instanceof Action ? (Action) mainHandler : null);
|
||||
|
||||
//先路径过滤下(包括了静态文件)
|
||||
//1.执行前置处理(主要是一些跨域之类的)
|
||||
if(beforeAuth != null) {
|
||||
beforeAuth.run(mainHandler);
|
||||
}
|
||||
|
||||
//先路径过滤下(包括了静态文件)
|
||||
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
|
||||
//2.执行注解处理
|
||||
if(authAnno(action)) {
|
||||
|
@ -172,19 +172,19 @@ public class SaTokenInterceptor implements RouterInterceptor {
|
||||
try {
|
||||
Action action = (mainHandler instanceof Action ? (Action) mainHandler : null);
|
||||
|
||||
//先路径过滤下(包括了静态文件)
|
||||
//1.执行前置处理(主要是一些跨域之类的)
|
||||
if(beforeAuth != null) {
|
||||
beforeAuth.run(mainHandler);
|
||||
}
|
||||
|
||||
//先路径过滤下(不包括静态文件)
|
||||
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
|
||||
//1.执行前置处理(主要是一些跨域之类的)
|
||||
if(beforeAuth != null) {
|
||||
beforeAuth.run(mainHandler);
|
||||
}
|
||||
//2.执行注解处理
|
||||
if(authAnno(action)) {
|
||||
//3.执行规则处理(如果没有被 @SaIgnore 忽略)
|
||||
auth.run(mainHandler);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (StopMatchException e) {
|
||||
|
||||
} catch (SaTokenException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user