Class ProxySubject


  • public class ProxySubject
    extends Subject
    The ProxySubject class represents the identity of a proxy, the confirmation key and confirmation obligation the proxy must posess and demonstrate for authentication purpose.
    • Constructor Detail

      • ProxySubject

        public ProxySubject​(NameIdentifier nameIdentifier,
                            SubjectConfirmation subjectConfirmation)
                     throws SAMLException
        Constructs a ProxySubject object from a NameIdentifier object and a SubjectConfirmation object.
        Parameters:
        nameIdentifier - NameIdentifier object.
        subjectConfirmation - SubjectConfirmation object.
        Throws:
        SAMLException - if nameIdentifier and SubjectConfirmation are null;
      • ProxySubject

        public ProxySubject​(NameIdentifier nameIdentifier)
                     throws SAMLException
        Constructs a ProxySubject object from a NameIdentifier object.
        Parameters:
        nameIdentifier - NameIdentifier object.
        Throws:
        SAMLException - if nameIdentifier is null.
      • ProxySubject

        public ProxySubject​(Element subjectElement)
                     throws SAMLException
        Constructs a ProxySubject object from a DOM Element. which has already been built into a DOM.
        Parameters:
        subjectElement - An Element representing DOM tree for ProxySubject object.
        Throws:
        SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.
      • ProxySubject

        public ProxySubject​(SubjectConfirmation subjectConfirmation)
                     throws SAMLException
        Constructs a ProxySubject object from a SubjectConfirmation object.
        Parameters:
        subjectConfirmation - SubjectConfirmation object to be added to the object.
        Throws:
        SAMLException - if subjectConfirmation is null.
    • Method Detail

      • equals

        public boolean equals​(ProxySubject subject)
        Checks for equality between this object and the ProxySubject passed down as parameter.
        Parameters:
        subject - ProxySubject to be checked
        Returns:
        true if the two are EXACTLY equal.
      • toString

        public String toString()
        Creates a String representation of the element.
        Overrides:
        toString in class Subject
        Returns:
        A string containing the valid XML for this element. By default name space name is prepended to the element name example <saml:Subject>
      • toString

        public String toString​(boolean includeNS,
                               boolean declareNS)
        Creates a String representation of the <Subject> element.
        Overrides:
        toString in class Subject
        Parameters:
        includeNS - if true prepends all elements by their Namespace name example <saml:Subject>.
        declareNS - if true includes the namespace within the generated XML.
        Returns:
        String containing the valid XML for this element.