【7.3.2】【auth】更新缓存使用

pull/41/head
fengshuonan 2022-11-09 19:07:44 +08:00
parent ac6bab76a2
commit e2f86878d0
1 changed files with 1 additions and 3 deletions

View File

@ -54,7 +54,6 @@ import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
import cn.stylefeng.roses.kernel.auth.api.pojo.sso.SsoLoginCodeRequest;
import cn.stylefeng.roses.kernel.auth.api.pojo.sso.SsoProperties;
import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi;
import cn.stylefeng.roses.kernel.cache.api.tenant.TenantCacheProxyFactory;
import cn.stylefeng.roses.kernel.demo.expander.DemoConfigExpander;
import cn.stylefeng.roses.kernel.jwt.JwtTokenOperator;
import cn.stylefeng.roses.kernel.jwt.api.context.JwtContext;
@ -303,8 +302,7 @@ public class AuthServiceImpl implements AuthServiceApi {
}
// 1.2 判断账号是否密码重试次数过多被冻结
CacheOperatorApi<Integer> tenantCacheProxy = TenantCacheProxyFactory.createTenantCacheProxy(loginRequest.getTenantCode(), loginErrorCountCacheApi);
Integer loginErrorCount = tenantCacheProxy.get(loginRequest.getAccount());
Integer loginErrorCount = loginErrorCountCacheApi.get(loginRequest.getAccount());
if (loginErrorCount != null && loginErrorCount >= LoginCacheConstants.MAX_ERROR_LOGIN_COUNT) {
throw new AuthException(AuthExceptionEnum.LOGIN_LOCKED);
}