com.sun.identity.federation.message
クラス FSAuthnResponse

java.lang.Object
  上位を拡張 com.sun.identity.saml.protocol.AbstractResponse
      上位を拡張 com.sun.identity.saml.protocol.Response
          上位を拡張 com.sun.identity.federation.message.FSAuthnResponse

public class FSAuthnResponse
extends Response

The class FSAuthnResponse creates and parses the Liberty Response. This class extends the SAML Response.


フィールドの概要
protected  String consentURI
           
protected  Element domElement
           
protected  String id
           
protected  int minorVersion
           
protected  String relayState
           
 
クラス com.sun.identity.saml.protocol.Response から継承されたフィールド
assertions, issuer, signatureString, status, xmlString
 
クラス com.sun.identity.saml.protocol.AbstractResponse から継承されたフィールド
inResponseTo, issueInstant, majorVersion, recipient, responseID, signature, signed, valid, validationDone
 
コンストラクタの概要
FSAuthnResponse(Element root)
          Constructor creates FSAuthnResponse object from Document Element.
FSAuthnResponse(String responseID, String inResponseTo, Status status, List contents, String relayState)
          Constructor to create FSAuthnResponse object.
 
メソッドの概要
 String getConsentURI()
          Returns the value of the consent attribute.
 Element getDOMElement()
          Returns the Document Element for this object.
 String getID()
          Returns the value of the id attribute.
 int getMinorVersion()
          Returns the value MinorVersion attribute.
 String getProviderId()
          Returns the ProviderID attribute value.
 String getRelayState()
          Returns the RelayState attribute in the Response.
 String getSignatureString()
          Returns the Signature string.
 String getSignedXMLString()
          Returns a signed XML Representation of this object.
static FSAuthnResponse parseAuthnResponseXML(String xml)
          Creates FSAuthnResponse object from XML Schema.
static FSAuthnResponse parseBASE64EncodedString(String encodedRes)
          Returns FSAutnResponse object by parsing a Base64 encoding XML string.
 void setConsentURI(String consent)
          Sets the value of the consent attribute.
 void setID(String id)
          Sets the value of the id attribute.
 void setMinorVersion(int version)
          Returns the value of MajorVersion attribute.
 void setProviderId(String provId)
          Sets the ProviderID attribute value.
 boolean setSignature(Element elem)
          Sets the Element signature.
 void signXML(String certAlias)
          Signs the Response.
 String toBASE64EncodedString()
          Returns a Base64 encoded string representing this object.
 String toXMLString()
          Returns the string representation of this object.
 String toXMLString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <samlp:Response> element.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Returns a String representation of the <samlp:Response> element.
 
クラス com.sun.identity.saml.protocol.Response から継承されたメソッド
addAssertion, getAssertion, getStatus, isSignatureValid, parseXML, parseXML, setStatus, signXML, toString, toString, toString
 
クラス com.sun.identity.saml.protocol.AbstractResponse から継承されたメソッド
getInResponseTo, getIssueInstant, getMajorVersion, getRecipient, getResponseID, getSignature, isSigned, setInResponseTo, setIssueInstant, setMajorVersion, setRecipient, setResponseID
 

フィールドの詳細

relayState

protected String relayState

consentURI

protected String consentURI

minorVersion

protected int minorVersion

id

protected String id

domElement

protected Element domElement
コンストラクタの詳細

FSAuthnResponse

public FSAuthnResponse(String responseID,
                       String inResponseTo,
                       Status status,
                       List contents,
                       String relayState)
                throws SAMLException,
                       FSMsgException
Constructor to create FSAuthnResponse object.

パラメータ:
responseID - value of the ResponseID attribute.
inResponseTo - value of the inResponseTo attribute.
status - the Status object.
contents - List of Assertions in the response. It could be null when there are no Assertions.
relayState - value of the RelayState attribute.
例外:
FSMsgException - on error.
SAMLException - on error.

FSAuthnResponse

public FSAuthnResponse(Element root)
                throws SAMLException,
                       FSMsgException
Constructor creates FSAuthnResponse object from Document Element.

パラメータ:
root - the Document Element
例外:
SAMLException - on error.
FSMsgException - on error.
メソッドの詳細

parseAuthnResponseXML

public static FSAuthnResponse parseAuthnResponseXML(String xml)
                                             throws SAMLException,
                                                    FSMsgException
Creates FSAuthnResponse object from XML Schema.

パラメータ:
xml - the XML Schema for this object.
例外:
SAMLException - on error.
FSMsgException - on error.
SAMLException

getID

public String getID()
Returns the value of the id attribute.

戻り値:
the value of id attribute.
関連項目:
FSAuthnResponse.setID(String)

setID

public void setID(String id)
Sets the value of the id attribute.

パラメータ:
id - the new value of id attribute.
関連項目:
FSAuthnResponse.getID()

getProviderId

public String getProviderId()
Returns the ProviderID attribute value.

戻り値:
value of the ProviderID attribute.
関連項目:
FSAuthnResponse.setProviderId(String)

setProviderId

public void setProviderId(String provId)
Sets the ProviderID attribute value.

パラメータ:
provId - new value of ProviderID attribute.
関連項目:
FSAuthnResponse.getProviderId()

getSignedXMLString

public String getSignedXMLString()
Returns a signed XML Representation of this object.

戻り値:
a signed XML Representation of this object.

getSignatureString

public String getSignatureString()
Returns the Signature string.

戻り値:
the Signature string.

getMinorVersion

public int getMinorVersion()
Returns the value MinorVersion attribute.

オーバーライド:
クラス AbstractResponse 内の getMinorVersion
戻り値:
the value MinorVersion attribute.
関連項目:
FSAuthnResponse.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int version)
Returns the value of MajorVersion attribute.

オーバーライド:
クラス AbstractResponse 内の setMinorVersion
パラメータ:
version - the value of MajorVersion attribute.
関連項目:
FSAuthnResponse.getMinorVersion()

getConsentURI

public String getConsentURI()
Returns the value of the consent attribute.

戻り値:
value of consent attribute.
関連項目:
FSAuthnResponse.setConsentURI(String)

setConsentURI

public void setConsentURI(String consent)
Sets the value of the consent attribute.

パラメータ:
consent - new value of consent attribute.
関連項目:
FSAuthnResponse.getConsentURI()

getDOMElement

public Element getDOMElement()
Returns the Document Element for this object.

戻り値:
the Document Element for this object.

getRelayState

public String getRelayState()
Returns the RelayState attribute in the Response.

戻り値:
the RelayState attribute in the Response.

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns the string representation of this object. This method translates the response to an XML document string based on the Response schema described above.

戻り値:
An XML String representing the response. NOTE: this is a complete SAML response xml string with ResponseID, MajorVersion, etc.
例外:
FSMsgException

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Returns a String representation of the <samlp:Response> 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
例外:
FSMsgException

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS,
                          boolean includeHeader)
                   throws FSMsgException
Returns a String representation of the <samlp:Response> 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
例外:
FSMsgException

parseBASE64EncodedString

public static FSAuthnResponse parseBASE64EncodedString(String encodedRes)
                                                throws FSMsgException,
                                                       SAMLException
Returns FSAutnResponse object by parsing a Base64 encoding XML string.

パラメータ:
encodedRes - the Base64 encoded string.
戻り値:
FSAuthnResponse object.
例外:
FSMsgException - if there is an error parsing the Base64 encoded string.
SAMLException - if there is an error creating the FSAuthnResponse object.

toBASE64EncodedString

public String toBASE64EncodedString()
                             throws FSMsgException
Returns a Base64 encoded string representing this object.

戻り値:
a Base64 encoded string representing this object.
例外:
FSMsgException - if there is an error creating a Base64 encoded string.

signXML

public void signXML(String certAlias)
             throws SAMLException
Signs the Response.

パラメータ:
certAlias - the Certificate Alias
例外:
SAMLException - if Response cannot be signed.

setSignature

public boolean setSignature(Element elem)
Sets the Element signature.

オーバーライド:
クラス Response 内の setSignature
パラメータ:
elem - the Element object
戻り値:
true if signature is set otherwise false