public String buildHtmlPostResponse(Document responseDoc, String actionUrl, boolean asRequest) throws ProcessingException, ConfigurationException, IOException { byte[] responseBytes = org.keycloak.saml.common.util.DocumentUtil.getDocumentAsString(responseDoc) .getBytes("UTF-8"); String samlResponse = PostBindingUtil.base64Encode(new String(responseBytes)); return buildHtml(samlResponse, actionUrl, asRequest); }
public String encoded() throws ProcessingException, ConfigurationException, IOException { byte[] responseBytes = DocumentUtil.getDocumentAsString(document).getBytes("UTF-8"); return PostBindingUtil.base64Encode(new String(responseBytes)); }