diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuth.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuth.java index 8880d8313a..aaddcf0811 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuth.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuth.java @@ -46,14 +46,11 @@ public class BasicAuth extends AbstractPageWithInjectedUrl { @Override public UriBuilder createUriBuilder() { return super.createUriBuilder() - .userInfo("{user}:{password}") .path("basic-auth") .queryParam("value", "{value}"); } - public BasicAuth setTemplateValues(String user, String password, String value) { - setUriParameter("user", user); - setUriParameter("password", password); + public BasicAuth setTemplateValues(String value) { setUriParameter("value", value); return this; } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractDemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractDemoServletsAdapterTest.java index 36ac062893..f59a916b2f 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractDemoServletsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/AbstractDemoServletsAdapterTest.java @@ -576,24 +576,24 @@ public abstract class AbstractDemoServletsAdapterTest extends AbstractServletsAd @Test public void testBasicAuth() { String value = "hello"; - Client client = ClientBuilder.newClient(); + Client client = ClientBuilder.newBuilder().newClient(); //pause(1000000); Response response = client.target(basicAuthPage - .setTemplateValues("mposolda", "password", value).buildUri()).request().get(); + .setTemplateValues(value).buildUri()).request().header("Authorization", BasicAuthHelper.createHeader("mposolda", "password")).get(); assertThat(response, Matchers.statusCodeIs(Status.OK)); assertEquals(value, response.readEntity(String.class)); response.close(); response = client.target(basicAuthPage - .setTemplateValues("invalid-user", "password", value).buildUri()).request().get(); + .setTemplateValues(value).buildUri()).request().header("Authorization", BasicAuthHelper.createHeader("invalid-user", "password")).get(); assertThat(response, Matchers.statusCodeIs(Status.UNAUTHORIZED)); assertThat(response, Matchers.body(anyOf(containsString("Unauthorized"), containsString("Status 401")))); response = client.target(basicAuthPage - .setTemplateValues("admin", "invalid-password", value).buildUri()).request().get(); + .setTemplateValues(value).buildUri()).request().header("Authorization", BasicAuthHelper.createHeader("admin", "invalid-password")).get(); assertThat(response, Matchers.statusCodeIs(Status.UNAUTHORIZED)); assertThat(response, Matchers.body(anyOf(containsString("Unauthorized"), containsString("Status 401"))));