|
|||||||||
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.SAMLRequest
Represents a SAML protocol request
Field Summary | |
protected java.util.ArrayList |
artifacts
|
protected java.util.ArrayList |
assertionIdRefs
|
protected java.util.Date |
issueInstant
|
protected SAMLQuery |
query
|
protected java.lang.String |
requestId
|
protected java.util.ArrayList |
respondWiths
|
Fields inherited from class org.opensaml.SAMLObject |
config, log, root |
Constructor Summary | |
SAMLRequest()
Default constructor |
|
SAMLRequest(java.util.Collection respondWiths,
SAMLQuery query,
java.util.Collection assertionIdRefs,
java.util.Collection artifacts)
Builds a SAML request out of its component parts |
|
SAMLRequest(org.w3c.dom.Element e)
Reconstructs a request from a DOM tree |
|
SAMLRequest(java.io.InputStream in)
Reconstructs a request from a stream |
Method Summary | |
void |
addArtifact(java.lang.String artifact)
Adds an artifact to the request |
void |
addAssertionIdRef(java.lang.String ref)
Adds an assertion ID reference to the request |
void |
addRespondWith(QName respondWith)
Adds a statement type to the request |
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 |
getArtifacts()
Gets the artifacts contained within the request |
java.util.Iterator |
getAssertionIdRefs()
Gets the assertion ID references contained within the request |
java.lang.String |
getId()
Gets the request ID |
java.util.Date |
getIssueInstant()
Gets the issue timestamp of the request |
SAMLQuery |
getQuery()
Gets the query contained within the request |
java.util.Iterator |
getRespondWiths()
Gets the types of statements the requester is prepared to accept |
protected void |
insertSignature()
Places the signature into the object's DOM to prepare for signing |
void |
removeArtifact(int index)
Removes an artifact by position (zero-based) |
void |
removeAssertionIdRef(int index)
Removes an assertion reference by position (zero-based) |
void |
removeRespondWith(int index)
Removes a statement type by position (zero-based) |
void |
setArtifacts(java.util.Collection artifacts)
Sets the artifacts contained within the request |
void |
setAssertionIdRefs(java.util.Collection refs)
Sets the assertion ID references contained within the request |
void |
setId(java.lang.String id)
Sets the request ID NOTE: Use this method with caution. |
void |
setIssueInstant(java.util.Date issueInstant)
Sets the issue timestamp of the request |
void |
setQuery(SAMLQuery query)
Sets the query contained within the request |
void |
setRespondWiths(java.util.Collection respondWiths)
Sets the types of statements the requester is prepared to accept |
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 requestId
protected java.util.Date issueInstant
protected java.util.ArrayList respondWiths
protected SAMLQuery query
protected java.util.ArrayList assertionIdRefs
protected java.util.ArrayList artifacts
Constructor Detail |
public SAMLRequest()
public SAMLRequest(java.util.Collection respondWiths, SAMLQuery query, java.util.Collection assertionIdRefs, java.util.Collection artifacts) throws SAMLException
The last three parameters are mutually exclusive of each other, and two of them should be null. They will be evaluated in order.
respondWiths
- The types of SAML statements (as QNames) to
accept in the query responsequery
- A query to place in the requestassertionIdRefs
- A set of AssertionIDRef values to dereferenceartifacts
- A set of artifacts to dereference
SAMLException
- Thrown if a request cannot be constructed from
the supplied informationpublic SAMLRequest(org.w3c.dom.Element e) throws SAMLException
e
- The root of a DOM tree
SAMLException
- Thrown if the object cannot be constructedpublic SAMLRequest(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 request IDpublic java.util.Date getIssueInstant()
public void setIssueInstant(java.util.Date issueInstant)
issueInstant
- The issue timestamppublic java.util.Iterator getRespondWiths()
public void setRespondWiths(java.util.Collection respondWiths)
respondWiths
- An iterator of QNames representing statement typespublic void addRespondWith(QName respondWith)
respondWith
- The type to addpublic void removeRespondWith(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the statement type to remove
java.lang.IndexOutOfBoundsException
public SAMLQuery getQuery()
public void setQuery(SAMLQuery query) throws SAMLException
query
- The query for the request
SAMLException
- Raised if the query is invalidpublic java.util.Iterator getAssertionIdRefs()
public void addAssertionIdRef(java.lang.String ref)
ref
- The reference to addpublic void setAssertionIdRefs(java.util.Collection refs)
refs
- The references to includepublic void removeAssertionIdRef(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the reference to remove
java.lang.IndexOutOfBoundsException
public java.util.Iterator getArtifacts()
public void setArtifacts(java.util.Collection artifacts)
public void addArtifact(java.lang.String artifact)
artifact
- The artifact to addpublic void removeArtifact(int index) throws java.lang.IndexOutOfBoundsException
index
- The position of the artifact 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 |