| | |
| | | import com.pollex.pam.service.OtpWebService; |
| | | import com.pollex.pam.business.service.dto.CustomerRegisterDTO; |
| | | import com.pollex.pam.business.service.dto.OtpResponseDTO; |
| | | import com.pollex.pam.business.web.errors.OtpLoginFailException; |
| | | import com.pollex.pam.business.web.vm.OtpLoginVM; |
| | | import com.pollex.pam.business.web.vm.VerifyOtpVM; |
| | | |
| | |
| | | |
| | | if (!StringUtils.hasText(sessionImpCode) |
| | | || !StringUtils.hasText(imgCode)) { |
| | | return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build(); |
| | | throw new OtpLoginFailException("驗證碼輸入錯誤"); |
| | | } |
| | | |
| | | if(!imgCode.equals(sessionImpCode)) { |
| | | return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); |
| | | throw new OtpLoginFailException("驗證碼輸入錯誤"); |
| | | } |
| | | |
| | | otpUtilService.verifyOtp(verifyOtpParam); |