|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.identity.saml.protocol.AbstractResponse com.sun.identity.saml.protocol.Response com.sun.identity.federation.message.FSResponse
This class FSResponse
is used to construct or parse
SSO/Federation Response using browser artifact profile.
Constructor Summary | |
FSResponse(org.w3c.dom.Element root)
Constructor. |
|
FSResponse(java.lang.String responseID,
java.lang.String inResponseTo,
Status status,
java.util.List contents)
This constructor shall only be used at the server side to construct a Response object. |
Method Summary | |
java.lang.String |
getID()
Gets id attribute. |
int |
getMinorVersion()
Gets minor version |
java.lang.String |
getSignatureString()
Get the Signature Element as string |
java.lang.String |
getSignedXMLString()
Get Signed XML String |
static FSResponse |
parseBASE64EncodedString(java.lang.String encodedRes)
Creates the response object based on the Base 64 encoded string. |
static FSResponse |
parseResponseXML(java.lang.String xml)
Returns Response object based on the XML document received from server. |
void |
setID(java.lang.String id)
Sets id attribute. |
void |
setMinorVersion(int version)
Sets minor version |
void |
signXML()
Signs the Response. |
void |
signXML(java.lang.String certAlias)
Signs the Response. |
java.lang.String |
toBASE64EncodedString()
Gets the BASE64 encoded string of the response object. |
java.lang.String |
toXMLString()
This method translates the response to an XML document String based on the Response schema described above. |
java.lang.String |
toXMLString(boolean includeNS,
boolean declareNS)
Creates a String representation of the response element. |
java.lang.String |
toXMLString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
Creates a String representation of the Response element. |
Methods inherited from class com.sun.identity.saml.protocol.Response |
addAssertion, getAssertion, getStatus, isSignatureValid, parseXML, parseXML, setSignature, setStatus, toString, toString, toString |
Methods inherited from class com.sun.identity.saml.protocol.AbstractResponse |
getInResponseTo, getIssueInstant, getMajorVersion, getRecipient, getResponseID, getSignature, isSigned, setInResponseTo, setIssueInstant, setMajorVersion, setRecipient, setResponseID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FSResponse(java.lang.String responseID, java.lang.String inResponseTo, Status status, java.util.List contents) throws SAMLException
ResponseID
,
MajorVersion
, etc. to form a complete Response object.
responseID
- If it's null, the constructor will create one.inResponseTo
- the RequestID
that this response is
corresponding. It could be null or empty string "".status
- The status of the response.contents
- A List of Assertions that are the content of the
Response. It could be null when there is no Assertion.
SAMLException
- if error occurs.public FSResponse(org.w3c.dom.Element root) throws SAMLException, FSMsgException
root
- Response element
FSMsgException
- if parsing failed.
SAMLException
- if unable to construct the Response object.Method Detail |
public java.lang.String getID()
public void setID(java.lang.String id)
id
- id to be set.public java.lang.String getSignedXMLString()
FSResponse
is not signed.public java.lang.String getSignatureString()
FSResponse
is not signed.public int getMinorVersion()
getMinorVersion
in class AbstractResponse
public void setMinorVersion(int version)
setMinorVersion
in class AbstractResponse
version
- minor version to be setpublic static FSResponse parseResponseXML(java.lang.String xml) throws SAMLException, FSMsgException
xml
- The Response XML document String.
NOTE: this is a complete SAML response XML string with
ResponseID
, MajorVersion
, etc.
FSResponse
object based on the XML document received
from server.
FSMsgException
- if unable to convert XML to DOM.
SAMLException
- if unable to construct the response object.public java.lang.String toXMLString() throws FSMsgException
ResponseID
,
MajorVersion
, etc.
FSMsgException
- if unable to get the XML string.public java.lang.String toXMLString(boolean includeNS, boolean declareNS) throws FSMsgException
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.
FSMsgException
- if unable to get the XML string.public java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader) throws FSMsgException
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.
FSMsgException
- if unable to get the XML string.public static FSResponse parseBASE64EncodedString(java.lang.String encodedRes) throws FSMsgException, SAMLException
encodedRes
- base 64 encoded response.
FSResponse
object
FSMsgException
- if unable to parse the encoded string
SAMLException
- if unable to parse the encoded stringpublic java.lang.String toBASE64EncodedString() throws FSMsgException
FSMsgException
- if unable to get the encoded string.public void signXML(java.lang.String certAlias) throws SAMLException
certAlias
- certificate alias which will be used for signing,
SAMLException
- if could not sign the Response.public void signXML() throws SAMLException
signXML
in class Response
SAMLException
- if could not sign the Response.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |