|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.SAMLObject
org.opensaml.SAMLSignedObject
org.opensaml.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 java.util.Date |
notBefore
|
protected java.util.Date |
notOnOrAfter
|
protected java.util.ArrayList |
statements
|
Fields inherited from class org.opensaml.SAMLObject |
config, log, 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.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 |
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 |
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 |
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 org.opensaml.SAMLSignedObject |
getNativeSignature, getSignatureAlgorithm, getSignatureElement, getX509Certificates, isSigned, sign, toDOM, unsign, verify, verify, verify |
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 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 informationpublic SAMLAssertion(org.w3c.dom.Element e) throws SAMLException
e
- The root of a DOM tree
SAMLException
- Thrown if the object cannot be constructedpublic SAMLAssertion(java.io.InputStream in) throws SAMLException
in
- A stream containing XML
SAMLException
- Raised if an exception occurs while constructing
the object.Method Detail |
protected void insertSignature() throws SAMLException
insertSignature
in class SAMLSignedObject
SAMLException
- Thrown if an error occurs while placing the signaturepublic void fromDOM(org.w3c.dom.Element e) throws SAMLException
SAMLObject
fromDOM
in class SAMLSignedObject
SAMLException
SAMLObject.fromDOM(org.w3c.dom.Element)
public java.lang.String getId()
getId
in class SAMLSignedObject
public 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 invalidpublic void addCondition(SAMLCondition c) throws SAMLException
c
- The condition to add
SAMLException
- Raised if an error occurs while adding the conditionpublic void removeCondition(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the condition to remove
java.lang.IndexOutOfBoundsException
public 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 objectspublic void addAdvice(java.lang.Object advice) throws SAMLException
SAMLException
- Raised if object is invalidpublic void removeAdvice(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the element to remove
java.lang.IndexOutOfBoundsException
public 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 objectspublic void addStatement(SAMLStatement s) throws SAMLException
s
- The statement to add
SAMLException
- Raised if an error occurs while adding the statementpublic void removeStatement(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the statement to remove
java.lang.IndexOutOfBoundsException
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 SAMLSignedObject
java.lang.CloneNotSupportedException
Object.clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |