|
|||||||||
| 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.SAMLSignedObject
gov.nih.nci.cagrid.opensaml.SAMLAssertion
public class SAMLAssertion
Represents a SAML Assertion
| Field Summary | |
|---|---|
protected java.util.ArrayList |
advice
|
protected java.lang.String |
assertionId
|
protected java.util.ArrayList |
conditions
|
protected java.util.Date |
issueInstant
|
protected java.lang.String |
issuer
|
protected int |
minor
|
protected java.util.Date |
notBefore
|
protected java.util.Date |
notOnOrAfter
|
protected java.util.ArrayList |
statements
|
| Fields inherited from class gov.nih.nci.cagrid.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, root |
| Constructor Summary | |
|---|---|
SAMLAssertion()
Default constructor |
|
SAMLAssertion(org.w3c.dom.Element e)
Reconstructs an assertion from a DOM tree |
|
SAMLAssertion(java.io.InputStream in)
Reconstructs an assertion from a stream |
|
SAMLAssertion(java.io.InputStream in,
int minor)
Reconstructs an assertion of a particular minor version from a stream |
|
SAMLAssertion(java.lang.String issuer,
java.util.Date notBefore,
java.util.Date notOnOrAfter,
java.util.Collection conditions,
java.util.Collection advice,
java.util.Collection statements)
Builds an assertion out of its component parts |
|
SAMLAssertion(java.lang.String assertionId,
java.util.Date issueInstant,
java.lang.String issuer,
java.util.Date notBefore,
java.util.Date notOnOrAfter,
java.util.Collection conditions,
java.util.Collection advice,
java.util.Collection statements)
Builds an assertion out of its component parts |
|
| Method Summary | |
|---|---|
void |
addAdvice(java.lang.Object advice)
Adds an advice element |
void |
addCondition(SAMLCondition c)
Adds a condition to the assertion |
void |
addStatement(SAMLStatement s)
Adds a statement to the assertion |
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 |
java.util.Iterator |
getAdvice()
Gets the optional Advice data included in the assertion Advice can be Strings (assertion references), Assertions, or DOM Elements. |
java.util.Iterator |
getConditions()
Gets the conditions included in the assertion |
java.lang.String |
getId()
Gets the assertion ID from the assertion |
java.util.Date |
getIssueInstant()
Gets the issue timestamp of the assertion |
java.lang.String |
getIssuer()
Gets the issuer of the assertion |
int |
getMinorVersion()
Gets the MinorVersion of the assertion. |
java.util.Date |
getNotBefore()
Gets the start of the assertion's validity period |
java.util.Date |
getNotOnOrAfter()
Gets the end of the assertion's validity period |
java.util.Iterator |
getStatements()
Gets the statements included in the assertion |
protected void |
insertSignature()
Places the signature into the object's DOM to prepare for signing |
void |
removeAdvice(int index)
Removes an advice element by position (zero-based) |
void |
removeCondition(int index)
Removes a condition by position (zero-based) |
void |
removeStatement(int index)
Removes a statement by position (zero-based) |
void |
setAdvice(java.util.Collection advice)
Sets the optional Advice data to include in the assertion |
void |
setConditions(java.util.Collection conditions)
Sets the conditions included in the assertion |
void |
setId(java.lang.String id)
Sets the assertion ID NOTE: Use this method with caution. |
void |
setIssueInstant(java.util.Date issueInstant)
Sets the issue timestamp of the assertion |
void |
setIssuer(java.lang.String issuer)
Sets the issuer name |
void |
setMinorVersion(int minor)
Sets the MinorVersion of the assertion |
void |
setNotBefore(java.util.Date notBefore)
Sets the start of the assertion's validity period |
void |
setNotOnOrAfter(java.util.Date notOnOrAfter)
Sets the end of the assertion's validity period |
void |
setStatements(java.util.Collection statements)
Sets the statements to include in the assertion |
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.SAMLSignedObject |
|---|
getDigestAlgorithm, getNativeSignature, getSignatureAlgorithm, getSignatureElement, getX509Certificates, isSigned, setDirty, sign, sign, toDOM, unsign, verify, verify, verify |
| Methods inherited from class gov.nih.nci.cagrid.opensaml.SAMLObject |
|---|
fromStream, fromStream, getParent, plantRoot, setParent, toBase64, toDOM, toDOM, toStream, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int minor
protected java.lang.String assertionId
protected java.lang.String issuer
protected java.util.Date issueInstant
protected java.util.Date notBefore
protected java.util.Date notOnOrAfter
protected java.util.ArrayList conditions
protected java.util.ArrayList advice
protected java.util.ArrayList statements
| Constructor Detail |
|---|
public SAMLAssertion()
public SAMLAssertion(java.lang.String issuer,
java.util.Date notBefore,
java.util.Date notOnOrAfter,
java.util.Collection conditions,
java.util.Collection advice,
java.util.Collection statements)
throws SAMLException
issuer - Name of SAML authority issuing assertionnotBefore - Optional start of validitynotOnOrAfter - Optional end of validityconditions - Set of conditions on validityadvice - Optional advice contentstatements - Set of SAML statements to place in assertion
SAMLException - Raised if an assertion cannot be constructed
from the supplied information
public SAMLAssertion(java.lang.String assertionId,
java.util.Date issueInstant,
java.lang.String issuer,
java.util.Date notBefore,
java.util.Date notOnOrAfter,
java.util.Collection conditions,
java.util.Collection advice,
java.util.Collection statements)
throws SAMLException
assertionId - Unique identifier for assertionissueInstant - Time of issuanceissuer - Name of SAML authority issuing assertionnotBefore - Optional start of validitynotOnOrAfter - Optional end of validityconditions - Set of conditions on validityadvice - Optional advice contentstatements - Set of SAML statements to place in assertion
SAMLException - Raised if an assertion cannot be constructed
from the supplied information
public SAMLAssertion(org.w3c.dom.Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLAssertion(java.io.InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object.
public SAMLAssertion(java.io.InputStream in,
int minor)
throws SAMLException
in - A stream containing XMLminor - The minor version of the incoming assertion
SAMLException - Raised if an exception occurs while constructing
the object.| Method Detail |
|---|
protected void insertSignature()
throws SAMLException
insertSignature in class SAMLSignedObjectSAMLException - Thrown if an error occurs while placing the signature
public void fromDOM(org.w3c.dom.Element e)
throws SAMLException
SAMLObject
fromDOM in class SAMLSignedObjecte - Root element of a DOM tree
SAMLException - Raised if an exception occurs while constructing
the objectSAMLObject.fromDOM(org.w3c.dom.Element)public int getMinorVersion()
public void setMinorVersion(int minor)
minor - The minor versionpublic java.lang.String getId()
getId in class SAMLSignedObjectpublic void setId(java.lang.String id)
id - The assertion IDpublic java.lang.String getIssuer()
public void setIssuer(java.lang.String issuer)
issuer - The issuer namepublic java.util.Date getIssueInstant()
public void setIssueInstant(java.util.Date issueInstant)
issueInstant - The issue timestamppublic java.util.Date getNotBefore()
public void setNotBefore(java.util.Date notBefore)
notBefore - The starting validity date and timepublic java.util.Date getNotOnOrAfter()
public void setNotOnOrAfter(java.util.Date notOnOrAfter)
notOnOrAfter - The ending validity date and timepublic java.util.Iterator getConditions()
public void setConditions(java.util.Collection conditions)
throws SAMLException
conditions - The conditions to include in the assertion
SAMLException - Raised if any of the conditions are invalid
public void addCondition(SAMLCondition c)
throws SAMLException
c - The condition to add
SAMLException - Raised if an error occurs while adding the condition
public void removeCondition(int index)
throws java.lang.IndexOutOfBoundsException
index - The position of the condition to remove
java.lang.IndexOutOfBoundsExceptionpublic java.util.Iterator getAdvice()
public void setAdvice(java.util.Collection advice)
throws SAMLException
advice - The Advice to include in the assertion
SAMLException - Raised if unable to construct new Advice objects
public void addAdvice(java.lang.Object advice)
throws SAMLException
data - a String, SAMLAssertion, or DOM Element
SAMLException - Raised if object is invalid
public void removeAdvice(int index)
throws java.lang.IndexOutOfBoundsException
index - The position of the element to remove
java.lang.IndexOutOfBoundsExceptionpublic java.util.Iterator getStatements()
public void setStatements(java.util.Collection statements)
throws SAMLException
statements - The statements to include in the assertion
SAMLException - Raised if unable to construct new statement objects
public void addStatement(SAMLStatement s)
throws SAMLException
s - The statement to add
SAMLException - Raised if an error occurs while adding the statement
public void removeStatement(int index)
throws java.lang.IndexOutOfBoundsException
index - The position of the statement to remove
java.lang.IndexOutOfBoundsException
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 SAMLSignedObjectjava.lang.CloneNotSupportedExceptionObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||