保誠-保戶業務員媒合平台
jack
2022-07-20 ef9a816480fa6b25ea85acc79fd0d1c5632d4323
[UPDATE] 將登入驗證碼改為一次性
修改2個檔案
5 ■■■■ 已變更過的檔案
pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/OtpResource.java 3 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java
@@ -66,7 +66,7 @@
        if(!imgCode.equals(sessionImpCode)) {
            throw new OtpLoginFailException("驗證碼輸入錯誤");
        }
        session.setAttribute("img_code", null);
        
        EServiceAuthenticationToken authenticationToken = new EServiceAuthenticationToken(
            eServiceLoginVM.getUsername(),
pamapi/src/main/java/com/pollex/pam/web/rest/OtpResource.java
@@ -89,6 +89,8 @@
            throw new OtpLoginFailException("驗證碼輸入錯誤");
        }
        
        session.setAttribute("img_code", null);
        OtpResponseDTO otpResponse;
        if(applicationProperty.isMockLogin()) {
            otpResponse = getMockSendOtpResponse();
@@ -101,6 +103,7 @@
            return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("can not support this login type, loginType = " + login.getLoginType().name());
        }
        otpTmpService.createOtpTmp(login.getAccount(), otpResponse.getIndexKey());
        return new ResponseEntity<>(otpResponse, HttpStatus.OK);
    }