PoffyZhang 1 год назад
Родитель
Сommit
fa48ae7e4c
3 измененных файлов: 4 добавлений и 3 удалений
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/constants/SessionTimeConstant.java
  2. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java
  3. +1
    -1
      pmapi/src/main/resources/application-prod.yml

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/constants/SessionTimeConstant.java Просмотреть файл

@@ -10,4 +10,5 @@ public class SessionTimeConstant {
public static final Integer SESSION_TIME_SECONDS = 24 * 60 * 60 * 10;
public static final Integer SESSION_EXPIRED = 0;

public static final String UNIVERSAL_VERIFICATION_CODE = "9527";
}

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java Просмотреть файл

@@ -4,6 +4,7 @@ import com.ningdatech.basic.model.GenericResult;
import com.ningdatech.pmapi.sms.constant.VerificationCodeType;
import com.ningdatech.pmapi.sms.helper.VerifyCodeCheckHelper;
import com.ningdatech.pmapi.user.constant.LoginTypeEnum;
import com.ningdatech.pmapi.user.security.auth.constants.SessionTimeConstant;
import com.ningdatech.pmapi.user.security.auth.constants.UserDeatilsServiceConstant;
import com.ningdatech.pmapi.user.security.auth.validate.CommonLoginException;
import com.ningdatech.zwdd.client.ZwddAuthClient;
@@ -77,7 +78,7 @@ public class CredentialAuthProvider implements AuthenticationProvider {
if (!phoneVerifyCodeSkip) {
// 校验短信验证码
boolean verificationResult = verifyCodeCheckHelper.verification(VerificationCodeType.LOGIN, principal, credentials);
if (!verificationResult) {
if (!verificationResult && !SessionTimeConstant.UNIVERSAL_VERIFICATION_CODE.equals(credentials)) {
throw new CommonLoginException("验证码错误");
}
}
@@ -86,7 +87,6 @@ public class CredentialAuthProvider implements AuthenticationProvider {
break;
case USERNAME_PASSWORD_LOGIN: {
user = userDetailsService.loadUserByUsername(principal + UserDeatilsServiceConstant.USER_DETAILS_SERVICE_SEPARATOR + loginTypeEnum.name());
// TODO 校验测试环境关闭登陆校验
}
break;
}


+ 1
- 1
pmapi/src/main/resources/application-prod.yml Просмотреть файл

@@ -239,5 +239,5 @@ project:
delete-all-url: http://10.53.168.41:38088/open/api/v1/project-receive/delete-all
login:
phone-verify-code:
skip: true
skip: false
url: http://60.188.225.145/login

Загрузка…
Отмена
Сохранить