com.sun.identity.saml.protocol
クラス Request

java.lang.Object
  上位を拡張 com.sun.identity.saml.protocol.AbstractRequest
      上位を拡張 com.sun.identity.saml.protocol.Request
直系の既知のサブクラス:
FSSAMLRequest

public class Request
extends AbstractRequest

This Request class represents a Request XML document. It extends from the abstract base class AbstractRequest.


フィールドの概要
protected  List artifacts
           
static int ASSERTION_ARTIFACT
          The request is an Assertion Artifact.
static int ASSERTION_ID_REFERENCE
          The request is an Assertion ID Reference.
protected  List assertionIDRefs
           
static int ATTRIBUTE_QUERY
          The request is an Attribute Query.
static int AUTHENTICATION_QUERY
          The request is an Authentication Query.
static int AUTHORIZATION_DECISION_QUERY
          The request is an Authorization Decision Query.
protected  int contentType
           
static int NOT_SUPPORTED
          The request is not supported.
protected  Query query
           
protected  String signatureString
           
protected  String xmlString
           
 
クラス com.sun.identity.saml.protocol.AbstractRequest から継承されたフィールド
issueInstant, majorVersion, minorVersion, requestID, respondWiths, signature, signed, valid
 
コンストラクタの概要
protected Request()
           
  Request(Element root)
          Constructor.
  Request(List respondWiths, String requestId, List contents)
          This constructor shall only be used at the client side to construct a Request object.
  Request(String requestId, List contents)
          This constructor shall only be used at the client side to construct a Request object.
  Request(String requestId, Query query)
          This constructor shall only be used at the client side to construct a Request object.
 
メソッドの概要
 List getAssertionArtifact()
          Gets the AssertionArtifact(s) of the Request.
 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(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(Element elem)
          Set the signature for the Response.
 void signXML()
          Method to sign the Request.
 String toString()
          This method translates the request to an XML document String based on the Request schema described above.
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <samlp:Request> element.
 String toString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Returns a String representation of the <samlp:Request> element.
 
クラス com.sun.identity.saml.protocol.AbstractRequest から継承されたメソッド
addRespondWith, getIssueInstant, getMajorVersion, getMinorVersion, getRequestID, getRespondWith, getSignature, isSignatureValid, isSigned, setIssueInstant, setMajorVersion, setMinorVersion, setRequestID
 

フィールドの詳細

query

protected Query query

assertionIDRefs

protected List assertionIDRefs

artifacts

protected List artifacts

contentType

protected int contentType

xmlString

protected String xmlString

signatureString

protected String signatureString

NOT_SUPPORTED

public static final int NOT_SUPPORTED
The request is not supported.

関連項目:
定数フィールド値

AUTHENTICATION_QUERY

public static final int AUTHENTICATION_QUERY
The request is an Authentication Query.

関連項目:
定数フィールド値

AUTHORIZATION_DECISION_QUERY

public static final int AUTHORIZATION_DECISION_QUERY
The request is an Authorization Decision Query.

関連項目:
定数フィールド値

ASSERTION_ID_REFERENCE

public static final int ASSERTION_ID_REFERENCE
The request is an Assertion ID Reference.

関連項目:
定数フィールド値

ASSERTION_ARTIFACT

public static final int ASSERTION_ARTIFACT
The request is an Assertion Artifact.

関連項目:
定数フィールド値

ATTRIBUTE_QUERY

public static final int ATTRIBUTE_QUERY
The request is an Attribute Query.

関連項目:
定数フィールド値
コンストラクタの詳細

Request

protected Request()

Request

public Request(List respondWiths,
               String requestId,
               List contents)
        throws SAMLException
This constructor shall only be used at the client side to construct a Request object. NOTE: The content here is just the body for the Request. The constructor will add MajorVersion, MinorVersion, etc. to form a complete Request.

パラメータ:
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.

Request

public Request(String requestId,
               Query query)
        throws SAMLException
This constructor shall only be used at the client side to construct a Request object. NOTE: The content here is just the body for the Request. The constructor will add MajorVersion, MinorVersion, etc. to form a complete Request.

パラメータ:
requestId - If it's null, the constructor will create one.
query - A Query to be included in the Request.
例外:
SAMLException - if an error occurs.

Request

public Request(String requestId,
               List contents)
        throws SAMLException
This constructor shall only be used at the client side to construct a Request object. NOTE: The content here is just the body for the Request. The constructor will add MajorVersion, MinorVersion, etc. to form a complete Request.

パラメータ:
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.

Request

public Request(Element root)
        throws SAMLException
Constructor.

パラメータ:
root - Request element
例外:
SAMLException
メソッドの詳細

signXML

public void signXML()
             throws SAMLException
Method to sign the Request.

定義:
クラス AbstractRequest 内の signXML
例外:
SAMLException - if could not sign the Request.

parseXML

public static Request parseXML(String xml)
                        throws SAMLException
This method shall only be used at the server side to reconstruct a Request object based on the XML document received from client. The schema of this XML document is described above.

パラメータ:
xml - The Request XML String. NOTE: this is a complete SAML request XML string with RequestID, MajorVersion, etc.
戻り値:
Request object
例外:
SAMLException - if an error occurs.

getQuery

public Query getQuery()
Gets the query of the Request.

戻り値:
the query included in the request; or null if the contentType of the request is not AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, or ATTRIBUTE_QUERY.

getAssertionIDReference

public List getAssertionIDReference()
Gets the AssertionIDReference(s) of the Request.

戻り値:
a List of AssertionIDReferences included in the request; or Collections.EMPTY_LIST if the contentType of the request is not ASSERTION_ID_REFERENCE.

getAssertionArtifact

public List getAssertionArtifact()
Gets the AssertionArtifact(s) of the Request.

戻り値:
a List of AssertionArtifacts included in the request; or Collections.EMPTY_LIST if the contentType of the request is not ASSERTION_ARTIFACT.

getContentType

public int getContentType()
Returns the type of content this Request has.

戻り値:
The type of the content. The possible values are defined in Request.

setSignature

public boolean setSignature(Element elem)
Set the signature for the Response.

オーバーライド:
クラス AbstractRequest 内の setSignature
パラメータ:
elem - ds:Signature element
戻り値:
true if the operation succeeds.

toString

public String toString()
This method translates the request to an XML document String based on the Request schema described above. NOTE: this is a complete SAML request XML string with RequestID, MajorVersion, etc.

オーバーライド:
クラス Object 内の toString
戻り値:
An XML String representing the request.

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the <samlp:Request> element.

パラメータ:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the namespace is declared within the Element.
戻り値:
A string containing the valid XML for this element

toString

public String toString(boolean includeNS,
                       boolean declareNS,
                       boolean includeHeader)
Returns a String representation of the <samlp:Request> element.

パラメータ:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the namespace is declared within the Element.
includeHeader - Determines whether the output include the XML declaration header.
戻り値:
A string containing the valid XML for this element