pamapi/src/doc/登入API/顧問登入ByEService.txt | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
pamapi/src/main/java/com/pollex/pam/web/rest/errors/EServiceErrorException.java | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 |
pamapi/src/doc/µn¤JAPI/ÅU°Ýµn¤JByEService.txt
@@ -8,11 +8,14 @@ } ç®åå¯ç¨é¡§åå¯åèAngelaç10å顧忏¬è©¦è³æ æªå:PCA-Matching Platform-test-data 1108.xlsx æªå:PCA-Matching Platform-test-data.xlsx 帳èå¦Excelä¸é¢æå¡«å¯«ï¼å¯ç¢¼å¨dev端並æªå¾EServiceæª¢æ ¸ï¼å¯ä»¥ç´æ¥ç»å ¥ response body: response body: è¥ç»å ¥æåå200 { "id_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJEMjY1MjYwNjYyIiwiYXV0aCI6IlJPTEVfVVNFUiIsImRldGFpbHMiOnsiQ29uc3VsdGFudEFnZW50Tm8iOiJEMjY1MjYwNjYyIiwiQ29uc3VsdGFudE5hbWUiOiLmnpfmiJDlrIwiLCJDb25zdWx0YW50SWQiOiI1In0sImV4cCI6MTYzNzY0OTQ5NX0.BjLiA-nuJOsUtD6UqyONr3brPXbdhjA_5srFBS2qgcvFhfznSOCZMlHtl4NtphiZ1CAk2jyg79QFlqGvM6Uk1A" } è¥èEService http status 200ï¼ä½æé¯èª¤æå401 å ¶é¤éEServiceç¸éçServer errorçå500 pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java
@@ -8,6 +8,7 @@ import com.pollex.pam.security.token.EServiceAuthenticationToken; import com.pollex.pam.service.LoginRecordService; import com.pollex.pam.service.dto.EServiceResponse; import com.pollex.pam.web.rest.errors.EServiceErrorException; import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; @@ -74,15 +75,15 @@ } else { loginRecordService.saveEServiceLoginFailRecord(account, eServiceResponse.getMsg()); throw new RuntimeException("eService login failed, eService response code = " + eServiceResponse.getCode() + ", eService response msg = " + eServiceResponse.getMsg()); throw new EServiceErrorException(eServiceResponse.getMsg()); } } throw new RuntimeException("eService http error!, response http status code = " + responseEntity.getStatusCode()); } catch (JsonProcessingException e) { throw new AuthenticationServiceException("convert to json processing error!"); throw new RuntimeException("convert to json processing error!"); } catch (GeneralSecurityException e) { throw new AuthenticationServiceException("General Security SSL error!"); throw new RuntimeException("General Security SSL error!"); } } pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java
@@ -28,9 +28,6 @@ @PostMapping("/authenticate") public ResponseEntity<UserJWTController.JWTToken> authorize(@RequestBody EServiceLoginVM eServiceLoginVM) { // todo é©è碼èªè EServiceAuthenticationToken authenticationToken = new EServiceAuthenticationToken( eServiceLoginVM.getUsername(), eServiceLoginVM.getPassword() pamapi/src/main/java/com/pollex/pam/web/rest/errors/EServiceErrorException.java
¤ñ¹ï·sÀÉ®× @@ -0,0 +1,11 @@ package com.pollex.pam.web.rest.errors; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(code = HttpStatus.UNAUTHORIZED) public class EServiceErrorException extends RuntimeException{ public EServiceErrorException(String message) { super(message); } }