|
|||||||||
| 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
public class SAMLResponse
Represents a SAML protocol response
| Field Summary | |
|---|---|
protected ArrayList |
assertions
|
protected SAMLException |
e
|
protected String |
inResponseTo
|
protected Date |
issueInstant
|
protected int |
minor
|
protected String |
recipient
|
protected String |
responseId
|
| Fields inherited from class org.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, root |
| Constructor Summary | |
|---|---|
SAMLResponse()
Default constructor |
|
SAMLResponse(Element e)
Reconstructs a response from a DOM tree |
|
SAMLResponse(InputStream in)
Reconstructs a response from a stream |
|
SAMLResponse(InputStream in,
int minor)
Reconstructs a response of a particular minor version from a stream |
|
SAMLResponse(String responseId,
Date issueInstant,
String inResponseTo,
String recipient,
Collection assertions,
SAMLException e)
Builds a SAML response out of its component parts |
|
SAMLResponse(String inResponseTo,
String recipient,
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 |
protected Element |
buildRoot(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. |
Object |
clone()
Copies a SAML object such that no dependencies exist between the original and the copy |
void |
fromDOM(Element e)
Initialization of an object from a DOM element |
Iterator |
getAssertions()
Gets the SAML assertions contained in the response, if any |
String |
getId()
Gets the response ID |
String |
getInResponseTo()
Gets the InResponseTo attribute |
Date |
getIssueInstant()
Gets the issue timestamp of the SAML response |
int |
getMinorVersion()
Gets the MinorVersion of the response. |
String |
getRecipient()
Gets the Recipient attribute of the SAML response |
SAMLException |
getStatus()
Gets the SAML Status contained in the response, if any (a SAMLException object is used to express the information, even in a successful case) |
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(Collection assertions)
Sets the SAML assertions to include in the response |
void |
setId(String id)
Sets the response ID NOTE: Use this method with caution. |
void |
setInResponseTo(String inResponseTo)
Sets the InResponseTo attribute |
void |
setIssueInstant(Date issueInstant)
Sets the issue timestamp of the response |
void |
setMinorVersion(int minor)
Sets the MinorVersion of the response |
void |
setRecipient(String recipient)
Sets the Recipient attribute |
void |
setStatus(SAMLException e)
Sets the SAML status to include in the response |
Node |
toDOM(Document doc,
boolean xmlns)
Transforms the object into a DOM tree using an existing document context |
| Methods inherited from class org.opensaml.SAMLSignedObject |
|---|
getDigestAlgorithm, getNativeSignature, getSignatureAlgorithm, getSignatureElement, getX509Certificates, isSigned, setDirty, sign, sign, toDOM, unsign, verify, verify, verify |
| Methods inherited from class org.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 String responseId
protected String inResponseTo
protected Date issueInstant
protected String recipient
protected ArrayList assertions
protected SAMLException e
| Constructor Detail |
|---|
public SAMLResponse()
public SAMLResponse(String inResponseTo,
String recipient,
Collection assertions,
SAMLException e)
throws SAMLException
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 information
public SAMLResponse(String responseId,
Date issueInstant,
String inResponseTo,
String recipient,
Collection assertions,
SAMLException e)
throws SAMLException
responseId - Unique identifier for responseissueInstant - Time of issuanceinResponseTo - 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 information
public SAMLResponse(Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLResponse(InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object.
public SAMLResponse(InputStream in,
int minor)
throws SAMLException
in - A stream containing XMLminor - The minor version of the incoming response
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(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 String getId()
getId in class SAMLSignedObjectpublic void setId(String id)
id - The response IDpublic String getInResponseTo()
public void setInResponseTo(String inResponseTo)
inResponseTo - The InResponseTo valuepublic Date getIssueInstant()
public void setIssueInstant(Date issueInstant)
issueInstant - The issue timestamppublic String getRecipient()
public void setRecipient(String recipient)
recipient - The Recipient valuepublic Iterator getAssertions()
public void setAssertions(Collection assertions)
throws SAMLException
assertions - The assertions to include
SAMLException - Raised if the assertions are invalid
public void addAssertion(SAMLAssertion assertion)
throws SAMLException
assertion - The assertion to add
SAMLException - Raised if the assertion is invalid
public void removeAssertion(int index)
throws IndexOutOfBoundsException
index - The position of the assertion to remove
IndexOutOfBoundsExceptionpublic SAMLException getStatus()
public void setStatus(SAMLException e)
throws SAMLException
assertions - The status to include
SAMLException - Raised if the status cannot be set or is invalid
protected Element buildRoot(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 Node toDOM(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 Object clone()
throws CloneNotSupportedException
clone in class SAMLSignedObjectCloneNotSupportedExceptionObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||