|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.identity.saml.protocol.AbstractRequest | +--com.sun.identity.saml.protocol.Request
This Request
class represents a Request XML document.
It extends from the abstract base class AbstractRequest
.
Field Summary | |
static int |
ASSERTION_ARTIFACT
|
static int |
ASSERTION_ID_REFERENCE
|
static int |
ATTRIBUTE_QUERY
|
static int |
AUTHENTICATION_QUERY
|
static int |
AUTHORIZATION_DECISION_QUERY
|
static int |
NOT_SUPPORTED
the types of contents that we support in a Request |
Constructor Summary | |
Request(org.w3c.dom.Element root)
Constructor. |
|
Request(java.util.List respondWiths,
java.lang.String requestId,
java.util.List contents)
This constructor shall only be used at the client side to construct a Request object. |
|
Request(java.lang.String requestId,
java.util.List contents)
This constructor shall only be used at the client side to construct a Request object. |
|
Request(java.lang.String requestId,
Query query)
This constructor shall only be used at the client side to construct a Request object. |
Method Summary | |
java.util.List |
getAssertionArtifact()
Gets the AssertionArtifact(s) of the Request. |
java.util.List |
getAssertionIDReference()
Gets the AssertionIDReference(s) of the Request. |
int |
getContentType()
Returns the type of content this Request has. |
Query |
getQuery()
Gets the query of the Request. |
static Request |
parseXML(java.lang.String xml)
This method shall only be used at the server side to reconstruct a Request object based on the XML document received from client. |
boolean |
setSignature(org.w3c.dom.Element elem)
Set the signature for the Response. |
void |
signXML()
Method to sign the Reqest. |
java.lang.String |
toString()
This method translates the request to an XML document String based on the Request schema described above. |
java.lang.String |
toString(boolean includeNS,
boolean declareNS)
Creates a String representation of the <samlp:Request> element. |
java.lang.String |
toString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
Creates a String representation of the <samlp:Request> element. |
Methods inherited from class com.sun.identity.saml.protocol.AbstractRequest |
addRespondWith, getIssueInstant, getMajorVersion, getMinorVersion, getRequestID, getRespondWith, getSignature, isSignatureValid, isSigned, setIssueInstant, setRequestID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NOT_SUPPORTED
public static final int AUTHENTICATION_QUERY
public static final int AUTHORIZATION_DECISION_QUERY
public static final int ASSERTION_ID_REFERENCE
public static final int ASSERTION_ARTIFACT
public static final int ATTRIBUTE_QUERY
Constructor Detail |
public Request(java.util.List respondWiths, java.lang.String requestId, java.util.List contents) throws SAMLException
respondWiths
- A List of Strings representing RespondWith elements.
It could be null when there is no <RespondWith>.
Each string could be prefixed by "saml:". If it is not
prefixed, or prefixed by a prefix other than "saml:",
"saml:" will be used instead.requestId
- If it's null, the constructor will create one.contents
- A List of objects that are the contents of Request that
the client wants to send to the server. It could be
an AuthenticationQuery, AuthorizationDecisionQuery,
AttributeQuery, 1 or more AssertionIDReference, or
1 or more of AssertionArtifact.SAMLException
- if an error occurs.public Request(java.lang.String requestId, Query query) throws SAMLException
requestId
- If it's null, the constructor will create one.query
- A Query to be included in the Request.public Request(java.lang.String requestId, java.util.List contents) throws SAMLException
requestId
- If it's null, the constructor will create one.contents
- A List of objects that are the contents of Request that
the client wants to send to the server. It could be
an AuthenticationQuery, AuthorizationDecisionQuery,
AttributeQuery, 1 or more AssertionIDReference,
or 1 or more of AssertionArtifact.public Request(org.w3c.dom.Element root) throws SAMLException
Method Detail |
public void signXML() throws SAMLException
signXML
in class AbstractRequest
SAMLException
- if couldn't sign the Request.public static Request parseXML(java.lang.String xml) throws SAMLException
xml
- The Request XML String.
NOTE: this is a complete SAML request xml string with
RequestID, MajorVersion, etc.SAMLException
- when an error occurs.public Query getQuery()
public java.util.List getAssertionIDReference()
public java.util.List getAssertionArtifact()
public int getContentType()
public boolean setSignature(org.w3c.dom.Element elem)
setSignature
in class AbstractRequest
elem
- ds:Signature elementpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean includeNS, boolean declareNS)
IncludeNS
- : Determines whether or not the namespace qualifier
is prepended to the Element when convertedDeclareNS
- : Determines whether or not the namespace is declared
within the Element.public java.lang.String toString(boolean includeNS, boolean declareNS, boolean includeHeader)
IncludeNS
- : Determines whether or not the namespace qualifier
is prepended to the Element when convertedDeclareNS
- : Determines whether or not the namespace is declared
within the Element.includeHeader:
- Determines whether the output include the xml
declaration header.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |