Top Description Constructors Methods
org.keycloak.common.util

public Class HttpPostRedirect

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
java.util.Map

Deprecated

Class is deprecated and may be removed in the future. Use org.keycloak.saml.BaseSAML2BindingBuilder#buildHtml instead

Helper class to do a browser redirect via a POST.
Author
Bill Burke
Version
$Revision: 1 $

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
buildHtml(String
may be null. Just the title of the HTML document
title
,
String
URL to redirect to
actionUrl
,
Map<String, String>
must be encoded so that they can be placed in an HTML form hidden INPUT field value
params
)

Generate an HTML page that does a browser redirect via a POST.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HttpPostRedirectback to summary
public HttpPostRedirect()

Method Detail

buildHtmlback to summary
public String buildHtml(String title, String actionUrl, Map<String, String> params)

Generate an HTML page that does a browser redirect via a POST. The HTML document uses Javascript to automatically submit a FORM post when loaded. This is similar to what the SAML Post Binding does. Here's an example

<HTML>
  <HEAD>
      <TITLE>title</TITLE>
  </HEAD>
  <BODY Onload="document.forms[0].submit()">
      <FORM METHOD="POST" ACTION="actionUrl">
          <INPUT TYPE="HIDDEN" NAME="param" VALUE="value"/>
          <NOSCRIPT>
              <P>JavaScript is disabled. We strongly recommend to enable it. Click the button below to continue.</P>
              <INPUT TYPE="SUBMIT" VALUE="CONTINUE"/>
          </NOSCRIPT>
      </FORM>
  </BODY>
</HTML>

Parameters
title:String

may be null. Just the title of the HTML document

actionUrl:String

URL to redirect to

params:Map<String, String>

must be encoded so that they can be placed in an HTML form hidden INPUT field value