final HtmlSubmitInput submit = (HtmlSubmitInput) form.getElementsByAttribute("input", "type", "submit").get(0);
return submit.click();
}
private String getDecodedAuthnRequest(String content) throws Exception {
StringWebResponse response = new StringWebResponse(content, new URL("http://localhost:8080/"));
WebClient webClient = new WebClient();
HtmlPage page = HTMLParser.parseHtml(response, webClient.getCurrentWindow());
HtmlForm form = page.getForms().get(0);
HtmlInput samlRequest = form.getInputByName("SAMLRequest");
return new String(Base64.decodeBase64(samlRequest.getValueAttribute()));