Class AuthnRequest

java.lang.Object
org.codelibs.saml2.core.authn.AuthnRequest

public class AuthnRequest extends Object
AuthNRequest class of Java Toolkit. A class that implements SAML 2 Authentication Request
  • Constructor Details

  • Method Details

    • postProcessXml

      protected String postProcessXml(String authnRequestXml, AuthnRequestParams params, Saml2Settings settings)
      Allows for an extension class to post-process the AuthnRequest XML generated for this request, in order to customize the result.

      This method is invoked at construction time, after all the other fields of this class have already been initialised. Its default implementation simply returns the input XML as-is, with no change.

      Parameters:
      authnRequestXml - the XML produced for this AuthnRequest by the standard implementation provided by AuthnRequest
      params - the authentication request input parameters
      settings - the settings
      Returns:
      the post-processed XML for this AuthnRequest, which will then be returned by any call to getAuthnRequestXml()
    • getEncodedAuthnRequest

      public String getEncodedAuthnRequest(Boolean deflated)
      Parameters:
      deflated - If deflated or not the encoded AuthnRequest
      Returns:
      the base64 encoded unsigned AuthnRequest (deflated or not)
    • getEncodedAuthnRequest

      public String getEncodedAuthnRequest()
      Returns:
      base64 encoded, unsigned AuthnRequest (deflated or not)
    • getAuthnRequestXml

      public String getAuthnRequestXml()
      Returns:
      unsigned plain-text AuthnRequest.
    • getId

      public String getId()
      Returns:
      the generated id of the AuthnRequest message
    • getIssueInstant

      public Calendar getIssueInstant()
      Returns the issue instant of this message.
      Returns:
      a new Calendar instance carrying the issue instant of this message