fix 修复 验证码开关未动态刷新问题
parent
bf8089bd8a
commit
22c1a9618a
|
|
@ -7,13 +7,14 @@ import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.dromara.auth.domain.vo.LoginVo;
|
import org.dromara.auth.domain.vo.LoginVo;
|
||||||
import org.dromara.common.core.exception.CaptchaException;
|
import org.dromara.auth.properties.CaptchaProperties;
|
||||||
import org.dromara.common.core.domain.model.LoginBody;
|
|
||||||
import org.dromara.auth.service.IAuthStrategy;
|
import org.dromara.auth.service.IAuthStrategy;
|
||||||
import org.dromara.auth.service.SysLoginService;
|
import org.dromara.auth.service.SysLoginService;
|
||||||
import org.dromara.common.core.constant.Constants;
|
import org.dromara.common.core.constant.Constants;
|
||||||
import org.dromara.common.core.constant.GlobalConstants;
|
import org.dromara.common.core.constant.GlobalConstants;
|
||||||
|
import org.dromara.common.core.domain.model.LoginBody;
|
||||||
import org.dromara.common.core.enums.LoginType;
|
import org.dromara.common.core.enums.LoginType;
|
||||||
|
import org.dromara.common.core.exception.CaptchaException;
|
||||||
import org.dromara.common.core.exception.user.CaptchaExpireException;
|
import org.dromara.common.core.exception.user.CaptchaExpireException;
|
||||||
import org.dromara.common.core.utils.MessageUtils;
|
import org.dromara.common.core.utils.MessageUtils;
|
||||||
import org.dromara.common.core.utils.ServletUtils;
|
import org.dromara.common.core.utils.ServletUtils;
|
||||||
|
|
@ -25,7 +26,6 @@ import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.system.api.RemoteUserService;
|
import org.dromara.system.api.RemoteUserService;
|
||||||
import org.dromara.system.api.domain.vo.RemoteClientVo;
|
import org.dromara.system.api.domain.vo.RemoteClientVo;
|
||||||
import org.dromara.system.api.model.LoginUser;
|
import org.dromara.system.api.model.LoginUser;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -38,8 +38,7 @@ import org.springframework.stereotype.Service;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class PasswordAuthStrategy implements IAuthStrategy {
|
public class PasswordAuthStrategy implements IAuthStrategy {
|
||||||
|
|
||||||
@Value("${security.captcha.enabled}")
|
private final CaptchaProperties captchaProperties;
|
||||||
private Boolean captchaEnabled;
|
|
||||||
|
|
||||||
private final SysLoginService loginService;
|
private final SysLoginService loginService;
|
||||||
|
|
||||||
|
|
@ -60,7 +59,7 @@ public class PasswordAuthStrategy implements IAuthStrategy {
|
||||||
String uuid = loginBody.getUuid();
|
String uuid = loginBody.getUuid();
|
||||||
|
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
if (captchaEnabled) {
|
if (captchaProperties.getEnabled()) {
|
||||||
validateCaptcha(tenantId, username, code, uuid);
|
validateCaptcha(tenantId, username, code, uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue