|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nci.cagrid.opensaml.SAMLObject
gov.nih.nci.cagrid.opensaml.SAMLSubject
public class SAMLSubject
Represents a SAML Subject
| Field Summary | |
|---|---|
static java.lang.String |
CONF_ARTIFACT
Artifact Confirmation Method Identifier |
static java.lang.String |
CONF_ARTIFACT01
Deprecated. Deprecated 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 gov.nih.nci.cagrid.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, 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 |
protected org.w3c.dom.Element |
buildRoot(org.w3c.dom.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. |
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 |
getNameIdentifier()
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 |
setNameIdentifier(SAMLNameIdentifier nameId)
Sets the name identifier of the Subject |
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 gov.nih.nci.cagrid.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 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_ARTIFACT01
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 (optional)
SAMLException - Raised if a subject cannot be constructed
from the supplied information
public SAMLSubject(org.w3c.dom.Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public 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 SAMLObjecte - 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 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 add
public void removeConfirmationMethod(int index)
throws java.lang.IndexOutOfBoundsException
index - The position of the method to remove
java.lang.IndexOutOfBoundsExceptionpublic 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 invalid
protected org.w3c.dom.Element buildRoot(org.w3c.dom.Document doc,
boolean xmlns)
SAMLObject
buildRoot in class SAMLObjectdoc - The document context to usexmlns - Include namespace(s) on root element?
SAMLObject.buildRoot(org.w3c.dom.Document,boolean)
public org.w3c.dom.Node toDOM(org.w3c.dom.Document doc,
boolean xmlns)
throws SAMLException
SAMLObject
toDOM in class SAMLObjectdoc - 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 SAMLObjectSAMLException - 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 SAMLObjectjava.lang.CloneNotSupportedExceptionObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||