Class SamlPostForm

java.lang.Object
com.revetsec.saml.SamlPostForm

@Immutable public final class SamlPostForm extends Object
A prepared browser form for a SAML HTTP-POST authentication or logout message. Render only over HTTPS. Retain browser-bound pending state before initiating a flow; a pending cookie needed on a cross-site POST callback requires Secure, HttpOnly and SameSite=None.
Since:
1.0.0
  • Method Details

    • getAction

      Returns the approved IdP form action.
      Returns:
      HTTPS action
      Since:
      1.0.0
    • getFields

      Returns the form fields for framework rendering.
      Returns:
      immutable field map
      Since:
      1.0.0
    • getHeaders

      Returns response headers for a transient form page.
      Returns:
      immutable headers
      Since:
      1.0.0
    • toHtml

      public @NonNull String toHtml(@Nullable String cspNonce)
      Renders an escaped HTML form. A supplied CSP nonce adds automatic submission; otherwise the page shows a submit button. The caller sets its own Content-Security-Policy header.
      Parameters:
      cspNonce - validated application-generated nonce, or null for manual submission
      Returns:
      complete HTML document
      Since:
      1.0.0
    • toString

      Redacts request values.
      Overrides:
      toString in class Object
      Returns:
      redacted description
      Since:
      1.0.0