use of org.keycloak.dom.saml.v2.protocol.AuthnRequestType in project keycloak by keycloak.
the class SamlRedirectBindingTest method testNoWhitespaceInLoginRequest.
@Test
public void testNoWhitespaceInLoginRequest() throws Exception {
AuthnRequestType authnRequest = SamlClient.createLoginRequestDocument(SAML_CLIENT_ID_SALES_POST, SAML_ASSERTION_CONSUMER_URL_SALES_POST, getAuthServerSamlEndpoint(REALM_NAME));
HttpUriRequest req = SamlClient.Binding.REDIRECT.createSamlUnsignedRequest(getAuthServerSamlEndpoint(REALM_NAME), null, SAML2Request.convert(authnRequest));
String url = req.getURI().getQuery();
assertThat(url, not(containsString(" ")));
assertThat(url, not(containsString("\n")));
assertThat(url, not(containsString("\r")));
assertThat(url, not(containsString("\t")));
}
Aggregations