mirror of https://gitee.com/xiaonuobase/snowy
【更新】BC端认证权限例子更明确 https://gitee.com/xiaonuobase/snowy/issues/I63AJ2
parent
405bf92794
commit
db2ef88c5f
|
@ -170,6 +170,14 @@ public class GlobalConfigure implements WebMvcConfigurer {
|
||||||
"/dev/sms/detail",
|
"/dev/sms/detail",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* B端要排除的,相当于C端要认证的
|
||||||
|
*/
|
||||||
|
private static final String[] CLIENT_USER_PERMISSION_PATH_ARR = {
|
||||||
|
"/auth/c/**",
|
||||||
|
"/client/c/**"
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册跨域过滤器
|
* 注册跨域过滤器
|
||||||
*/
|
*/
|
||||||
|
@ -186,7 +194,7 @@ public class GlobalConfigure implements WebMvcConfigurer {
|
||||||
// 排除无需登录接口
|
// 排除无需登录接口
|
||||||
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
|
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
|
||||||
// 排除C端认证接口
|
// 排除C端认证接口
|
||||||
.notMatch("/auth/c/**")
|
.notMatch(CollectionUtil.newArrayList(CLIENT_USER_PERMISSION_PATH_ARR))
|
||||||
// 校验B端登录
|
// 校验B端登录
|
||||||
.check(r1 -> StpUtil.checkLogin());
|
.check(r1 -> StpUtil.checkLogin());
|
||||||
|
|
||||||
|
@ -195,7 +203,7 @@ public class GlobalConfigure implements WebMvcConfigurer {
|
||||||
// 排除无需登录接口
|
// 排除无需登录接口
|
||||||
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
|
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
|
||||||
// 匹配C端认证接口
|
// 匹配C端认证接口
|
||||||
.match("/auth/c/**")
|
.match(CollectionUtil.newArrayList(CLIENT_USER_PERMISSION_PATH_ARR))
|
||||||
// 校验C端登录
|
// 校验C端登录
|
||||||
.check(r1 -> StpClientUtil.checkLogin());
|
.check(r1 -> StpClientUtil.checkLogin());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue