|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.SAMLObject
org.opensaml.SAMLSubject
Represents a SAML Subject
Field Summary | |
static java.lang.String |
CONF_ARTIFACT
Type 01 Artifact Confirmation Method Identifier |
static java.lang.String |
CONF_BEARER
Assertion Bearer Confirmation Method Identifier |
static java.lang.String |
CONF_HOLDER_KEY
Holder of Key Confirmation Method Identifier |
static java.lang.String |
CONF_SENDER_VOUCHES
Sender Vouches Confirmation Method Identifier |
protected org.w3c.dom.Element |
confirmationData
|
protected java.util.ArrayList |
confirmationMethods
|
protected org.apache.xml.security.keys.KeyInfo |
keyInfo
|
protected SAMLNameIdentifier |
nameId
|
Fields inherited from class org.opensaml.SAMLObject |
config, log, root |
Constructor Summary | |
SAMLSubject()
Default constructor |
|
SAMLSubject(org.w3c.dom.Element e)
Reconstructs a subject from a DOM tree |
|
SAMLSubject(java.io.InputStream in)
Reconstructs a subject from a stream |
|
SAMLSubject(SAMLNameIdentifier nameId,
java.util.Collection confirmationMethods,
org.w3c.dom.Element confirmationData,
java.lang.Object keyInfo)
Builds a subject out of its component parts |
Method Summary | |
void |
addConfirmationMethod(java.lang.String confirmationMethod)
Adds a confirmation method to the Subject |
void |
checkValidity()
Evaluates the object's content to see if it is currently valid if serialized. |
java.lang.Object |
clone()
Copies a SAML object such that no dependencies exist between the original and the copy |
void |
fromDOM(org.w3c.dom.Element e)
Initialization of an object from a DOM element |
org.w3c.dom.Element |
getConfirmationData()
Gets the optional confirmation data of the Subject |
java.util.Iterator |
getConfirmationMethods()
Gets the confirmation methods of the Subject |
org.w3c.dom.Element |
getKeyInfo()
Gets the ds:KeyInfo DOM that is included in the subject, if any |
SAMLNameIdentifier |
getName()
Gets the name identifier of the Subject |
java.lang.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(org.w3c.dom.Element confirmationData)
Sets the optional confirmation data of the Subject |
void |
setConfirmationMethods(java.util.Collection confirmationMethods)
Sets the confirmation methods of the Subject |
void |
setKeyInfo(java.lang.Object keyInfo)
Sets the ds:KeyInfo of the Subject |
void |
setName(SAMLNameIdentifier nameId)
Sets the name identifier of the Subject |
org.w3c.dom.Node |
toDOM()
Transforms the object into a DOM tree without an existing document context, including namespace declarations |
org.w3c.dom.Node |
toDOM(org.w3c.dom.Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
Methods inherited from class org.opensaml.SAMLObject |
fromStream, plantRoot, toBase64, 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 java.util.ArrayList confirmationMethods
protected org.w3c.dom.Element confirmationData
protected org.apache.xml.security.keys.KeyInfo keyInfo
public static final java.lang.String CONF_ARTIFACT
public static final java.lang.String CONF_BEARER
public static final java.lang.String CONF_HOLDER_KEY
public static final java.lang.String CONF_SENDER_VOUCHES
Constructor Detail |
public SAMLSubject()
public SAMLSubject(SAMLNameIdentifier nameId, java.util.Collection confirmationMethods, org.w3c.dom.Element confirmationData, java.lang.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
SAMLException
- Raised if a subject cannot be constructed
from the supplied informationpublic SAMLSubject(org.w3c.dom.Element e) throws SAMLException
e
- The root of a DOM tree
SAMLException
- Thrown if the object cannot be constructedpublic SAMLSubject(java.io.InputStream in) throws SAMLException
in
- A stream containing XML
SAMLException
- Raised if an exception occurs while constructing
the object.Method Detail |
public void fromDOM(org.w3c.dom.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 getName()
public void setName(SAMLNameIdentifier nameId) throws SAMLException
nameId
- The name identifier
SAMLException
- Raised if the object is invalidpublic java.util.Iterator getConfirmationMethods()
public void setConfirmationMethods(java.util.Collection confirmationMethods)
confirmationMethods
- The confirmation methodspublic void addConfirmationMethod(java.lang.String confirmationMethod)
confirmationMethod
- The method URI to addpublic void removeConfirmationMethod(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the method to remove
java.lang.IndexOutOfBoundsException
public org.w3c.dom.Element getConfirmationData()
public void setConfirmationData(org.w3c.dom.Element confirmationData)
confirmationData
- The saml:SubjectConfirmationData elementpublic org.w3c.dom.Element getKeyInfo()
public java.lang.Object getNativeKeyInfo()
public void setKeyInfo(java.lang.Object keyInfo) throws SAMLException
keyInfo
- The ds:KeyInfo DOM or native library object
SAMLException
- Raised if the object is invalidpublic org.w3c.dom.Node toDOM() throws SAMLException
SAMLObject
toDOM
in class SAMLObject
SAMLException
- Raised if the object is incompletely definedSAMLObject.toDOM()
public org.w3c.dom.Node toDOM(org.w3c.dom.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 java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class SAMLObject
java.lang.CloneNotSupportedException
Object.clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |