Class AbstractResponse

    • Field Detail

      • responseID

        protected String responseID
      • inResponseTo

        protected String inResponseTo
      • majorVersion

        protected int majorVersion
      • minorVersion

        protected int minorVersion
      • signature

        protected Element signature
      • issueInstant

        protected Date issueInstant
      • recipient

        protected String recipient
      • signed

        protected boolean signed
      • valid

        protected boolean valid
      • validationDone

        protected boolean validationDone
    • Constructor Detail

      • AbstractResponse

        protected AbstractResponse()
        Default constructor.
    • Method Detail

      • isSigned

        public boolean isSigned()
        Return whether the object is signed or not.
        Returns:
        true if the object is signed; false otherwise.
      • isSignatureValid

        public boolean isSignatureValid()
        Returns whether the signature on the object is valid or not.
        Returns:
        boolean true if the signature is valid; false otherwise.
      • signXML

        public abstract void signXML()
                              throws SAMLException
        An abstract method that signs the object.
        Throws:
        SAMLException - if could not sign the object.
      • getResponseID

        public String getResponseID()
        Gets the ResponseID of the Response.
        Returns:
        the ResponseID of the Response.
      • setResponseID

        public boolean setResponseID​(String responseID)
        Set the ResponseID of the Response.
        Parameters:
        responseID - A String that is the ResponseID attribute of the Response.
        Returns:
        true if the operation is successful.
      • getInResponseTo

        public String getInResponseTo()
        Gets the InResponseTo of the Response.
        Returns:
        the InResponseTo of the Response.
      • setInResponseTo

        public boolean setInResponseTo​(String inResponseTo)
        Set the InResponseTo of the Response.
        Parameters:
        inResponseTo - The InResponseTo attribute of the Response.
        Returns:
        true if the operation is successful.
      • getMajorVersion

        public int getMajorVersion()
        Gets the MajorVersion of the Response.
        Returns:
        The MajorVersion of the Response.
      • getMinorVersion

        public int getMinorVersion()
        Gets the MinorVersion of the Response.
        Returns:
        The MinorVersion of the SAML response.
      • setMajorVersion

        public void setMajorVersion​(int majorVersion)
        Sets the MajorVersion of the Response.
        Parameters:
        majorVersion - the intended major version of SAML response.
      • setMinorVersion

        public void setMinorVersion​(int minorVersion)
        Sets the MinorVersion of the Response.
        Parameters:
        minorVersion - the intended minor version of SAML response.
      • getSignature

        public Element getSignature()
        Gets the signature of the Response.
        Returns:
        The signature element of the Response. null is returned if the Response has no ds:Signature.
      • setSignature

        public boolean setSignature​(Element elem)
        Set the signature for the Response.
        Parameters:
        elem - ds:Signature element
        Returns:
        true if the operation succeeds.
      • getIssueInstant

        public Date getIssueInstant()
        Returns the IssueInstant of the Response.
        Returns:
        the IssueInstant of the Response.
      • setIssueInstant

        public boolean setIssueInstant​(Date issueInstant)
        Set the IssueInstant of the Response.
        Parameters:
        issueInstant - a Date object representing the time when the Response is issued.
        Returns:
        true if the operation succeeds.
      • getRecipient

        public String getRecipient()
        Gets the recipient of the Response.
        Returns:
        The Recipient.
      • setRecipient

        public boolean setRecipient​(String recipient)
        Set the Recipient attribute of the Response.
        Parameters:
        recipient - A String representing the Recipient attribute of the Response.
        Returns:
        true if the operation is successful;