mirror of
https://github.com/zccbbg/wms-ruoyi.git
synced 2024-09-20 03:05:53 +08:00
refactor: checkLogin登录失败定位到ip
This commit is contained in:
parent
6f60dc1859
commit
30276a2ec0
|
@ -307,7 +307,8 @@ public class SysLoginService {
|
|||
* 登录校验
|
||||
*/
|
||||
private void checkLogin(LoginType loginType, String username, Supplier<Boolean> supplier) {
|
||||
String errorKey = CacheConstants.PWD_ERR_CNT_KEY + username;
|
||||
String clientIP = ServletUtils.getClientIP();
|
||||
String errorKey = CacheConstants.PWD_ERR_CNT_KEY + username+":"+clientIP;
|
||||
String loginFail = Constants.LOGIN_FAIL;
|
||||
|
||||
// 获取用户登录错误次数,默认为0 (可自定义限制策略 例如: key + username + ip)
|
||||
|
|
Loading…
Reference in a new issue