Class AbstractSaml2AuthenticationRequest

java.lang.Object
org.springframework.security.saml2.provider.service.authentication.AbstractSaml2AuthenticationRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Saml2PostAuthenticationRequest, Saml2RedirectAuthenticationRequest

public abstract class AbstractSaml2AuthenticationRequest extends Object implements Serializable
Data holder for AuthNRequest parameters to be sent using either the Saml2MessageBinding.POST or Saml2MessageBinding.REDIRECT binding. Data will be encoded and possibly deflated, but will not be escaped for transport, ie URL encoded, UriUtils.encode(String, Charset) or HTML encoded, HtmlUtils.htmlEscape(String). https://www.oasis-open.org/committees/download.php/35711/sstc-saml-core-errata-2.0-wd-06-diff.pdf (line 2031)
Since:
5.3
See Also:
  • Method Details

    • getSamlRequest

      public String getSamlRequest()
      Returns the AuthNRequest XML value to be sent. This value is already encoded for transport. If getBinding() is Saml2MessageBinding.REDIRECT the value is deflated and SAML encoded. If getBinding() is Saml2MessageBinding.POST the value is SAML encoded.
      Returns:
      the SAMLRequest parameter value
    • getRelayState

      public String getRelayState()
      Returns the RelayState value, if present in the parameters
      Returns:
      the RelayState value, or null if not available
    • getAuthenticationRequestUri

      public String getAuthenticationRequestUri()
      Returns the URI endpoint that this AuthNRequest should be sent to.
      Returns:
      the URI endpoint for this message
    • getRelyingPartyRegistrationId

      public String getRelyingPartyRegistrationId()
      The identifier for the RelyingPartyRegistration associated with this request
      Returns:
      the RelyingPartyRegistration id
      Since:
      5.8
    • getId

      public String getId()
      The unique identifier for this Authentication Request
      Returns:
      the Authentication Request identifier
      Since:
      5.8
    • getBinding

      public abstract Saml2MessageBinding getBinding()
      Returns the binding this AuthNRequest will be sent and encoded with. If Saml2MessageBinding.REDIRECT is used, the DEFLATE encoding will be automatically applied.
      Returns:
      the binding this message will be sent with.