Merge branch '2023_CR2' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into 2023_CR2
| | |
| | | |
| | | @Transactional |
| | | public void verifyOtp(String account, String indexKey, String otpCode) { |
| | | if (applicationProperty.isMockLogin()) { |
| | | |
| | | OtpTmp otpTmp = otpTmpService.findByAccountAndIndexKey(account, indexKey); |
| | | if(otpTmp==null) { |
| | | log.info("otp login fail... , account = {}, indexKey = {}, failReason = {}", account, indexKey, "Index key and account field mismatch"); |
| | | throw new OtpLoginFailException("otp error"); |
| | | } |
| | | |
| | | if (applicationProperty.isMockLogin()) { |
| | | log.debug("Do MockLogin"); |
| | | } else { // otp logon |
| | | OtpResponseDTO otpResponseDTO = otpWebService.verifyOTP(indexKey, otpCode); |
| | | |
| | | OtpResponseDTO otpResponseDTO = otpWebService.verifyOTP(indexKey, otpCode); |
| | | if (otpResponseDTO.isSuccess()) { |
| | | log.info("otp login success!, account = {}", account); |
| | | } |