抽取登录路径变量
This commit is contained in:
+8
-1
@@ -77,6 +77,13 @@ public class AuthFilter extends BaseFilter implements Ordered, BootCommonConstan
|
|||||||
*/
|
*/
|
||||||
private static final Set<String> LOGIN_WHITE_LIST = new HashSet<>();
|
private static final Set<String> LOGIN_WHITE_LIST = new HashSet<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录uri
|
||||||
|
*/
|
||||||
|
private static final Set<String> LOGIN_URI = Set.of(
|
||||||
|
"/sys/login/passwd"
|
||||||
|
);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
@@ -187,7 +194,7 @@ public class AuthFilter extends BaseFilter implements Ordered, BootCommonConstan
|
|||||||
if (checkLoginWhiteList(uri)) {
|
if (checkLoginWhiteList(uri)) {
|
||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
// 记录登录日志
|
// 记录登录日志
|
||||||
if (Objects.equals("/sys/login/passwd", uri)) {
|
if (LOGIN_URI.contains(uri)) {
|
||||||
LoginUserDto loginUser = AuthUtils.getDefNull();
|
LoginUserDto loginUser = AuthUtils.getDefNull();
|
||||||
if (loginUser == null) {
|
if (loginUser == null) {
|
||||||
log.setTitle("系统登录-密码登录失败");
|
log.setTitle("系统登录-密码登录失败");
|
||||||
|
|||||||
Reference in New Issue
Block a user