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

java.lang.Object
  extended by com.sun.identity.saml.assertion.Subject
      extended by 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.


Field Summary
 
Fields inherited from class com.sun.identity.saml.assertion.Subject
_nameIdentifier, _subjectConfirmation
 
Constructor Summary
ProxySubject(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.
 String toString()
          Creates a String representation of the element.
 String toString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <Subject> element.
 
Methods inherited from class com.sun.identity.saml.assertion.Subject
createNameIdentifier, createSubjectConfirmation, equals, getNameIdentifier, getSubjectConfirmation, removeNameIdentifier, removeSubjectConfirmation, setNameIdentifier, setSubjectConfirmation
 

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.