com.sun.identity.liberty.ws.security
Class ProxySubject

java.lang.Object
  |
  +--com.sun.identity.saml.assertion.Subject
        |
        +--com.sun.identity.liberty.ws.security.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 Summary
ProxySubject(org.w3c.dom.Element subjectElement)
          Constructs a ProxySubject object from a DOM Element.
ProxySubject(NameIdentifier nameIdentifier)
          Constructs a ProxySubject object from a NameIdentifier object.
ProxySubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation)
          Constructs a ProxySubject object from a NameIdentifier object and a SubjectConfirmation object.
ProxySubject(SubjectConfirmation subjectConfirmation)
          Constructs a ProxySubject object from a SubjectConfirmation object.
 
Method Summary
 boolean equals(ProxySubject subject)
          Checks for equality between this object and the ProxySubject passed down as parameter.
 java.lang.String toString()
          Creates a String representation of the element.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <Subject> element.
 
Methods inherited from class com.sun.identity.saml.assertion.Subject
equals, getNameIdentifier, getSubjectConfirmation, removeNameIdentifier, removeSubjectConfirmation, setNameIdentifier, setSubjectConfirmation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(org.w3c.dom.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 java.lang.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 java.lang.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:
A string containing the valid XML for this element.