Class HttpPostRedirect


  • @Deprecated
    public class HttpPostRedirect
    extends Object
    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.
    Version:
    $Revision: 1 $
    Author:
    Bill Burke
    • Constructor Detail

      • HttpPostRedirect

        public HttpPostRedirect()
        Deprecated.
    • Method Detail

      • buildHtml

        public String buildHtml​(String title,
                                String actionUrl,
                                Map<String,​String> params)
        Deprecated.
        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 - may be null. Just the title of the HTML document
        actionUrl - URL to redirect to
        params - must be encoded so that they can be placed in an HTML form hidden INPUT field value
        Returns: