保誠-保戶業務員媒合平台
wayne
2021-11-29 0f1695c2df8145fd355243f2972ae457e9d6ba0b
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!");
        }
    }