com.coveo.saml.BrowserUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of saml-client Show documentation
Show all versions of saml-client Show documentation
Dead simple client for obtaining authentication from SAML identity provider
package com.coveo.saml;
import org.apache.commons.lang.StringEscapeUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Writer;
import java.util.Map;
public class BrowserUtils {
/**
* Renders an HTTP response that will cause the browser to POST the specified values to an url.
* @param url the url where to perform the POST.
* @param response the {@link HttpServletResponse}.
* @param values the values to include in the POST.
* @throws IOException thrown if an IO error occurs.
*/
public static void postUsingBrowser(
String url, HttpServletResponse response, Map values) throws IOException {
response.setContentType("text/html");
Writer writer = response.getWriter();
writer.write(
"");
writer.flush();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy