|
|
@@ -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; |
|
|
|
} |
|
|
|