|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.SAMLObject
org.opensaml.SAMLSubject
public class SAMLSubject
Represents a SAML Subject
Field Summary | |
---|---|
static String |
CONF_ARTIFACT
Artifact Confirmation Method Identifier |
static String |
CONF_ARTIFACT01
Deprecated. Deprecated artifact Confirmation Method Identifier |
static String |
CONF_BEARER
Assertion Bearer Confirmation Method Identifier |
static String |
CONF_HOLDER_KEY
Holder of Key Confirmation Method Identifier |
static String |
CONF_SENDER_VOUCHES
Sender Vouches Confirmation Method Identifier |
protected Element |
confirmationData
|
protected ArrayList |
confirmationMethods
|
protected org.apache.xml.security.keys.KeyInfo |
keyInfo
|
protected SAMLNameIdentifier |
nameId
|
Fields inherited from class org.opensaml.SAMLObject |
---|
config, dirty, log, parentObject, root |
Constructor Summary | |
---|---|
SAMLSubject()
Default constructor |
|
SAMLSubject(Element e)
Reconstructs a subject from a DOM tree |
|
SAMLSubject(InputStream in)
Reconstructs a subject from a stream |
|
SAMLSubject(SAMLNameIdentifier nameId,
Collection confirmationMethods,
Element confirmationData,
Object keyInfo)
Builds a subject out of its component parts |
Method Summary | |
---|---|
void |
addConfirmationMethod(String confirmationMethod)
Adds a confirmation method to the Subject |
protected Element |
buildRoot(Document doc,
boolean xmlns)
Delegates the process of building the root element of an object and inserting appropriate namespaces. |
void |
checkValidity()
Evaluates the object's content to see if it is currently valid if serialized. |
Object |
clone()
Copies a SAML object such that no dependencies exist between the original and the copy |
void |
fromDOM(Element e)
Initialization of an object from a DOM element |
Element |
getConfirmationData()
Gets the optional confirmation data of the Subject |
Iterator |
getConfirmationMethods()
Gets the confirmation methods of the Subject |
Element |
getKeyInfo()
Gets the ds:KeyInfo DOM that is included in the subject, if any |
SAMLNameIdentifier |
getNameIdentifier()
Gets the name identifier of the Subject |
Object |
getNativeKeyInfo()
Gets the native library object for the ds:KeyInfo that is included in the subject, if any |
void |
removeConfirmationMethod(int index)
Removes a confirmation method by position (zero-based) |
void |
setConfirmationData(Element confirmationData)
Sets the optional confirmation data of the Subject |
void |
setConfirmationMethods(Collection confirmationMethods)
Sets the confirmation methods of the Subject |
void |
setKeyInfo(Object keyInfo)
Sets the ds:KeyInfo of the Subject |
void |
setNameIdentifier(SAMLNameIdentifier nameId)
Sets the name identifier of the Subject |
Node |
toDOM(Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
Methods inherited from class org.opensaml.SAMLObject |
---|
fromStream, fromStream, getParent, plantRoot, setDirty, setParent, toBase64, toDOM, toDOM, toDOM, toStream, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SAMLNameIdentifier nameId
protected ArrayList confirmationMethods
protected Element confirmationData
protected org.apache.xml.security.keys.KeyInfo keyInfo
public static final String CONF_ARTIFACT
public static final String CONF_ARTIFACT01
public static final String CONF_BEARER
public static final String CONF_HOLDER_KEY
public static final String CONF_SENDER_VOUCHES
Constructor Detail |
---|
public SAMLSubject()
public SAMLSubject(SAMLNameIdentifier nameId, Collection confirmationMethods, Element confirmationData, Object keyInfo) throws SAMLException
nameId
- Name of subject (optional)confirmationMethods
- Confirmation method(s) that bind the subject
to an enclosing assertion (optional)confirmationData
- Arbitrary confirmation data DOM (optional)keyInfo
- A ds:KeyInfo, either from an xmlsig library or a DOM element (optional)
SAMLException
- Raised if a subject cannot be constructed
from the supplied informationpublic SAMLSubject(Element e) throws SAMLException
e
- The root of a DOM tree
SAMLException
- Thrown if the object cannot be constructedpublic SAMLSubject(InputStream in) throws SAMLException
in
- A stream containing XML
SAMLException
- Raised if an exception occurs while constructing
the object.Method Detail |
---|
public void fromDOM(Element e) throws SAMLException
SAMLObject
fromDOM
in class SAMLObject
e
- Root element of a DOM tree
SAMLException
- Raised if an exception occurs while constructing
the objectSAMLObject.fromDOM(org.w3c.dom.Element)
public SAMLNameIdentifier getNameIdentifier()
public void setNameIdentifier(SAMLNameIdentifier nameId) throws SAMLException
nameId
- The name identifier
SAMLException
- Raised if the object is invalidpublic Iterator getConfirmationMethods()
public void setConfirmationMethods(Collection confirmationMethods)
confirmationMethods
- The confirmation methodspublic void addConfirmationMethod(String confirmationMethod)
confirmationMethod
- The method URI to addpublic void removeConfirmationMethod(int index) throws IndexOutOfBoundsException
index
- The position of the method to remove
IndexOutOfBoundsException
public Element getConfirmationData()
public void setConfirmationData(Element confirmationData)
confirmationData
- The saml:SubjectConfirmationData elementpublic Element getKeyInfo()
public Object getNativeKeyInfo()
public void setKeyInfo(Object keyInfo) throws SAMLException
keyInfo
- The ds:KeyInfo DOM or native library object
SAMLException
- Raised if the object is invalidprotected Element buildRoot(Document doc, boolean xmlns)
SAMLObject
buildRoot
in class SAMLObject
doc
- The document context to usexmlns
- Include namespace(s) on root element?
SAMLObject.buildRoot(org.w3c.dom.Document,boolean)
public Node toDOM(Document doc, boolean xmlns) throws SAMLException
SAMLObject
toDOM
in class SAMLObject
doc
- A Document object to use in manufacturing the treexmlns
- Include namespace(s) on root element?
SAMLException
- Raised if the object is incompletely definedSAMLObject.toDOM(org.w3c.dom.Document,boolean)
public void checkValidity() throws SAMLException
SAMLObject
checkValidity
in class SAMLObject
SAMLException
- Raised if the serialized object would be invalid SAML,
excluding any embedded objectsSAMLObject.checkValidity()
public Object clone() throws CloneNotSupportedException
clone
in class SAMLObject
CloneNotSupportedException
Object.clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |