Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Failure API tests for user defined federated authenticator management #21814

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,27 @@ protected Response getResponseOfPost(String endpointUri, String body) {
.post(endpointUri);
}

/**
* Invoke given endpointUri for POST with given body and Basic authentication, authentication credential being the
* authenticatingUserName and authenticatingCredential.
* This implementation does not incorporate any additional filters.
*
* @param endpointUri endpoint to be invoked
* @param body payload
* @return response
*/
protected Response getResponseOfPostNoFilter(String endpointUri, String body) {
Shenali-SJ marked this conversation as resolved.
Show resolved Hide resolved

return given().auth().preemptive().basic(authenticatingUserName, authenticatingCredential)
.contentType(ContentType.JSON)
.header(HttpHeaders.ACCEPT, ContentType.JSON)
.body(body)
.log().ifValidationFails()
.when()
.log().ifValidationFails()
.post(endpointUri);
}

/**
* Invoke given endpointUri for POST with given body and Basic authentication, authentication credential being the
* authenticatingUserName and authenticatingCredential
Expand Down
Loading