After that I have found fix for this Exaptation,
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
fixed this Exaptation with code below:
request.config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames().relaxedHTTPSValidation()));
I faced a problem can't to get token from response. I get 401 status code for authorization request, /token/missed. Have not idea why. 'cuz via Postman I should not set token in header for this request, request to get token. Probably somebody had faced this issue and know how to fix it?
public EndPoints (String baseUrl) {
RestAssured.baseURI = baseUrl;
request = RestAssured.given();
request.config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames().relaxedHTTPSValidation()));
request.header("Content-Type", "application/json");
request.header("Accept","application/json");
}
public void authenticateUser(AuthorizationRequest authorizationRequest) {
Response response = request.log().all().body(authorizationRequest).post(RoutApi.loginTo());
question from:
https://stackoverflow.com/questions/65680081/after-ignore-ssl-certificate-via-rest-assured-get-401-for-token-request 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…