Class SessionSubject
- java.lang.Object
-
- com.sun.identity.saml.assertion.Subject
-
- com.sun.identity.federation.message.FSSubject
-
- com.sun.identity.liberty.ws.security.SessionSubject
-
public class SessionSubject extends FSSubject
TheSessionSubjectclass represents a liberty subject with associated session status.
-
-
Field Summary
-
Fields inherited from class com.sun.identity.federation.message.FSSubject
_idpNameIdentifier
-
Fields inherited from class com.sun.identity.saml.assertion.Subject
_nameIdentifier, _subjectConfirmation
-
-
Constructor Summary
Constructors Constructor Description SessionSubject(NameIdentifier nameIdentifier, IDPProvidedNameIdentifier idpNameIdentifier)Constructs aSessionSubjectobject from aNameIdentifierobject and aIDPProvidedNameIdentifierobject.SessionSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation, IDPProvidedNameIdentifier idpNameIdentifier)Constructs aSessionSubjectobject from aNameIdentifierobject,SubjectConfirmationandIDPProvidedNameIdentifierobject.SessionSubject(SubjectConfirmation subjectConfirmation)Constructs aSessionSubjectobject from aSubjectConfirmationobject.SessionSubject(Element subjectElement)Constructs aSessionSubjectobject from a DOM element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoXMLString()Returns a String representation of the element.StringtoXMLString(boolean includeNS, boolean declareNS)Returns a String representation of the<Subject>element.-
Methods inherited from class com.sun.identity.federation.message.FSSubject
getIDPProvidedNameIdentifier, setIDPProvidedNameIdentifier
-
Methods inherited from class com.sun.identity.saml.assertion.Subject
createNameIdentifier, createSubjectConfirmation, equals, getNameIdentifier, getSubjectConfirmation, removeNameIdentifier, removeSubjectConfirmation, setNameIdentifier, setSubjectConfirmation, toString, toString
-
-
-
-
Constructor Detail
-
SessionSubject
public SessionSubject(NameIdentifier nameIdentifier, SubjectConfirmation subjectConfirmation, IDPProvidedNameIdentifier idpNameIdentifier) throws FSMsgException, SAMLException
Constructs aSessionSubjectobject from aNameIdentifierobject,SubjectConfirmationandIDPProvidedNameIdentifierobject.- Parameters:
nameIdentifier-NameIdentifierobject.subjectConfirmation-SubjectConfirmationobject.idpNameIdentifier-IDPProvidedNameIdentifierobject.- Throws:
FSMsgException- ifidpNameIdentifieris null.SAMLException- if bothnameIdentifierandsubjectConfirmationare null.
-
SessionSubject
public SessionSubject(NameIdentifier nameIdentifier, IDPProvidedNameIdentifier idpNameIdentifier) throws FSMsgException, SAMLException
Constructs aSessionSubjectobject from aNameIdentifierobject and aIDPProvidedNameIdentifierobject.- Parameters:
nameIdentifier-NameIdentifierobject.idpNameIdentifier-IDPProvidedNameIdentifierobject.- Throws:
FSMsgException- ifidpNameIdentifieris null.SAMLException- ifnameIdentifieris null.
-
SessionSubject
public SessionSubject(Element subjectElement) throws FSMsgException, SAMLException
Constructs aSessionSubjectobject from a DOM element. which has already been built into a DOM.- Parameters:
subjectElement- An Element representing DOM tree for Subject object- Throws:
SAMLException- if can not create the object ofNameIdentifierorSubjectConfirmationinside the DOM element.FSMsgException- if it could not process the Element properly, implying that there is an error in the sender or in the element definition.
-
SessionSubject
public SessionSubject(SubjectConfirmation subjectConfirmation) throws SAMLException
Constructs aSessionSubjectobject from aSubjectConfirmationobject.- Parameters:
subjectConfirmation-SubjectConfirmationobject to be added to the object.- Throws:
SAMLException- ifsubjectConfirmationis null.
-
-
Method Detail
-
toXMLString
public String toXMLString() throws FSMsgException
Returns a String representation of the element.- Overrides:
toXMLStringin classFSSubject- Returns:
- a string containing the valid XML for this element
By default name space name is prepended to the element name
example
<saml:Subject>. - Throws:
FSMsgException- if could not create a String representation of this element.
-
toXMLString
public String toXMLString(boolean includeNS, boolean declareNS) throws FSMsgException
Returns a String representation of the<Subject>element.- Overrides:
toXMLStringin classFSSubject- 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.
- Throws:
FSMsgException- if could not create a String representation of this element.
-
-