| | |
| | | import com.pollex.pam.security.token.EServiceAuthenticationToken; |
| | | import com.pollex.pam.service.LoginRecordService; |
| | | import com.pollex.pam.service.dto.EServiceResponse; |
| | | import com.pollex.pam.service.util.HttpRequestUtil; |
| | | import com.pollex.pam.web.rest.errors.EServiceErrorException; |
| | | import org.apache.http.conn.ssl.NoopHostnameVerifier; |
| | | import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
| | |
| | | @Component |
| | | public class EServiceAuthenticationProvider { |
| | | |
| | | private static final String E_SERVICE_LOGIN_SUCCESS_CODE = "0"; |
| | | private static final String E_SERVICE_LOGIN_SUCCESS_CODE = "true"; |
| | | private static final Logger log = LoggerFactory.getLogger(EServiceAuthenticationProvider.class); |
| | | |
| | | @Autowired |
| | |
| | | EServiceResponse eServiceResponse = responseEntity.getBody(); |
| | | log.debug("eService response = {}", eServiceResponse); |
| | | |
| | | if(E_SERVICE_LOGIN_SUCCESS_CODE.equals(eServiceResponse.getCode())){ |
| | | if(E_SERVICE_LOGIN_SUCCESS_CODE.equals(eServiceResponse.getIssuccess())){ |
| | | loginRecordService.saveEServiceLoginSuccessRecord(account); |
| | | return getConsultantToken(account, credentials); |
| | | } |