|
|||||||||
| 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
public class SAMLRequest
Represents a SAML protocol request
| Field Summary | |
|---|---|
protected ArrayList |
artifacts
|
protected ArrayList |
assertionIdRefs
|
protected Date |
issueInstant
|
protected int |
minor
|
protected SAMLQuery |
query
|
protected String |
requestId
|
protected ArrayList |
respondWiths
|
| Fields inherited from class org.opensaml.SAMLObject |
|---|
config, dirty, log, parentObject, root |
| Constructor Summary | |
|---|---|
SAMLRequest()
Default constructor |
|
SAMLRequest(Collection artifactsOrIdRefs)
Builds a SAML request using artifacts or assertion references |
|
SAMLRequest(Collection artifactsOrIdRefs,
String requestId,
Date issueInstant)
Builds a SAML request using artifacts or assertion references |
|
SAMLRequest(Element e)
Reconstructs a request from a DOM tree |
|
SAMLRequest(InputStream in)
Reconstructs a request from a stream |
|
SAMLRequest(InputStream in,
int minor)
Reconstructs a request of a particular minor version from a stream |
|
SAMLRequest(SAMLQuery query)
Builds a SAML request using a query |
|
SAMLRequest(SAMLQuery query,
String requestId,
Date issueInstant)
Builds a SAML request using a query |
|
| Method Summary | |
|---|---|
void |
addArtifact(Artifact artifact)
Adds an artifact to the request |
void |
addAssertionIdRef(String ref)
Adds an assertion ID reference to the request |
void |
addRespondWith(javax.xml.namespace.QName respondWith)
Adds a statement type to the request |
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 |
getArtifacts()
Gets the artifacts contained within the request |
Iterator |
getAssertionIdRefs()
Gets the assertion ID references contained within the request |
String |
getId()
Gets the request ID |
Date |
getIssueInstant()
Gets the issue timestamp of the request |
int |
getMinorVersion()
Gets the MinorVersion of the request. |
SAMLQuery |
getQuery()
Gets the query contained within the request |
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(Collection artifacts)
Sets the artifacts contained within the request |
void |
setAssertionIdRefs(Collection refs)
Sets the assertion ID references contained within the request |
void |
setId(String id)
Sets the request ID NOTE: Use this method with caution. |
void |
setIssueInstant(Date issueInstant)
Sets the issue timestamp of the request |
void |
setMinorVersion(int minor)
Sets the MinorVersion of the request |
void |
setQuery(SAMLQuery query)
Sets the query contained within the request |
void |
setRespondWiths(Collection respondWiths)
Sets the types of statements the requester is prepared to accept |
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 requestId
protected Date issueInstant
protected ArrayList respondWiths
protected SAMLQuery query
protected ArrayList assertionIdRefs
protected ArrayList artifacts
| Constructor Detail |
|---|
public SAMLRequest()
public SAMLRequest(SAMLQuery query)
throws SAMLException
query - A query to place in the request
SAMLException - Thrown if a request cannot be constructed from
the supplied information
public SAMLRequest(SAMLQuery query,
String requestId,
Date issueInstant)
throws SAMLException
query - A query to place in the requestrequestId - Unique identifier for requestissueInstant - Time of issuance
SAMLException - Thrown if a request cannot be constructed from
the supplied information
public SAMLRequest(Collection artifactsOrIdRefs)
throws SAMLException
artifactsOrIdRefs - A collection of Artifacts or Strings (but not both)
SAMLException - Thrown if a request cannot be constructed from
the supplied information
public SAMLRequest(Collection artifactsOrIdRefs,
String requestId,
Date issueInstant)
throws SAMLException
artifactsOrIdRefs - A collection of Artifacts or Strings (but not both)requestId - Unique identifier for requestissueInstant - Time of issuance
SAMLException - Thrown if a request cannot be constructed from
the supplied information
public SAMLRequest(Element e)
throws SAMLException
e - The root of a DOM tree
SAMLException - Thrown if the object cannot be constructed
public SAMLRequest(InputStream in)
throws SAMLException
in - A stream containing XML
SAMLException - Raised if an exception occurs while constructing
the object.
public SAMLRequest(InputStream in,
int minor)
throws SAMLException
in - A stream containing XMLminor - The minor version of the incoming request
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 request IDpublic Date getIssueInstant()
public void setIssueInstant(Date issueInstant)
issueInstant - The issue timestamppublic Iterator getRespondWiths()
public void setRespondWiths(Collection respondWiths)
respondWiths - An iterator of QNames representing statement typespublic void addRespondWith(javax.xml.namespace.QName respondWith)
respondWith - The type to add
public void removeRespondWith(int index)
throws IndexOutOfBoundsException
index - The position of the statement type to remove
IndexOutOfBoundsExceptionpublic SAMLQuery getQuery()
public void setQuery(SAMLQuery query)
throws SAMLException
query - The query for the request
SAMLException - Raised if the query is invalidpublic Iterator getAssertionIdRefs()
public void addAssertionIdRef(String ref)
ref - The reference to addpublic void setAssertionIdRefs(Collection refs)
refs - The references to include
public void removeAssertionIdRef(int index)
throws IndexOutOfBoundsException
index - The position of the reference to remove
IndexOutOfBoundsExceptionpublic Iterator getArtifacts()
public void setArtifacts(Collection artifacts)
refs - The artifacts to includepublic void addArtifact(Artifact artifact)
artifact - The artifact to add
public void removeArtifact(int index)
throws IndexOutOfBoundsException
index - The position of the artifact to remove
IndexOutOfBoundsException
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 | ||||||||