|
|||||||||
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.SAMLResponse
Represents a SAML protocol response
Field Summary | |
protected java.util.ArrayList |
assertions
|
protected SAMLException |
e
|
protected java.lang.String |
inResponseTo
|
protected java.util.Date |
issueInstant
|
protected java.lang.String |
recipient
|
protected java.lang.String |
responseId
|
Fields inherited from class org.opensaml.SAMLObject |
config, log, root |
Constructor Summary | |
SAMLResponse()
Default constructor |
|
SAMLResponse(org.w3c.dom.Element e)
Reconstructs a response from a DOM tree |
|
SAMLResponse(java.io.InputStream in)
Reconstructs a response from a stream |
|
SAMLResponse(java.lang.String inResponseTo,
java.lang.String recipient,
java.util.Collection assertions,
SAMLException e)
Builds a SAML response out of its component parts |
Method Summary | |
void |
addAssertion(SAMLAssertion assertion)
Adds an assertion to the response |
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 |
getAssertions()
Gets the SAML assertions contained in the response, if any |
java.lang.String |
getId()
Gets the response ID |
java.lang.String |
getInResponseTo()
Gets the InResponseTo attribute |
java.util.Date |
getIssueInstant()
Gets the issue timestamp of the SAML response |
java.lang.String |
getRecipient()
Gets the Recipient attribute of the SAML response |
protected void |
insertSignature()
Places the signature into the object's DOM to prepare for signing |
void |
removeAssertion(int index)
Removes assertion by position (zero-based) |
void |
setAssertions(java.util.Collection assertions)
Sets the SAML assertions to include in the response |
void |
setId(java.lang.String id)
Sets the response ID NOTE: Use this method with caution. |
void |
setInResponseTo(java.lang.String inResponseTo)
Sets the InResponseTo attribute |
void |
setIssueInstant(java.util.Date issueInstant)
Sets the issue timestamp of the response |
void |
setRecipient(java.lang.String recipient)
Sets the Recipient attribute |
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 |
checkValidity, 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 responseId
protected java.lang.String inResponseTo
protected java.util.Date issueInstant
protected java.lang.String recipient
protected java.util.ArrayList assertions
protected SAMLException e
Constructor Detail |
public SAMLResponse()
public SAMLResponse(java.lang.String inResponseTo, java.lang.String recipient, java.util.Collection assertions, SAMLException e) throws SAMLException
If a signature object is provided, it is annotated with transforms to sign the entire response and use the SHA-1 digest algorithm.
inResponseTo
- The request ID that prompted the response, if anyrecipient
- The URL of the intended recipient of the responseassertions
- The SAML assertion(s) to return in the
response, if anye
- The SAML error status information to return in
the response, if any
SAMLException
- Raised if a response cannot be constructed
from the supplied informationpublic SAMLResponse(org.w3c.dom.Element e) throws SAMLException
e
- The root of a DOM tree
SAMLException
- Thrown if the object cannot be constructedpublic SAMLResponse(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 response IDpublic java.lang.String getInResponseTo()
public void setInResponseTo(java.lang.String inResponseTo)
inResponseTo
- The InResponseTo valuepublic java.util.Date getIssueInstant()
public void setIssueInstant(java.util.Date issueInstant)
issueInstant
- The issue timestamppublic java.lang.String getRecipient()
public void setRecipient(java.lang.String recipient)
recipient
- The Recipient valuepublic java.util.Iterator getAssertions()
public void setAssertions(java.util.Collection assertions) throws SAMLException
assertions
- The assertions to include
SAMLException
- Raised if the assertions are invalidpublic void addAssertion(SAMLAssertion assertion) throws SAMLException
assertion
- The assertion to add
SAMLException
- Raised if the assertion is invalidpublic void removeAssertion(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the assertion 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 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 |