Exemplo n.º 1
0
  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);
  }
Exemplo n.º 2
0
 public String encoded() throws ProcessingException, ConfigurationException, IOException {
   byte[] responseBytes = DocumentUtil.getDocumentAsString(document).getBytes("UTF-8");
   return PostBindingUtil.base64Encode(new String(responseBytes));
 }