From a9556593ae9a6227fe4612f2805c970cc4390ede Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期二, 30 十一月 2021 10:34:01 +0800 Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM --- pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java b/pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java index a23c399..0a3db3b 100644 --- a/pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java +++ b/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!"); } } -- Gitblit v1.8.0