|
||||||||||
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.FSAuthnResponse
This class FSAuthnResponse
is used to create or parse an ID-FF
authentication response using POST/LECP profile.
Constructor Summary | |
FSAuthnResponse(org.w3c.dom.Element root)
Constructor. |
|
FSAuthnResponse(java.lang.String responseID,
java.lang.String inResponseTo,
Status status,
java.util.List contents,
java.lang.String relayState)
This constructor shall only be used at the server side to construct a Response object. |
Method Summary | |
java.lang.String |
getConsentURI()
Gets consent URI |
org.w3c.dom.Element |
getDOMElement()
Returns original DOM Element used to construct the FSAuthnResponse object. |
java.lang.String |
getID()
Gets id attribute. |
int |
getMinorVersion()
Gets minor version |
java.lang.String |
getProviderId()
Gets provider ID for this response |
java.lang.String |
getRelayState()
Gets the RelayState of the Response. |
java.lang.String |
getSignatureString()
Get the Signature Element string |
java.lang.String |
getSignedXMLString()
Get Signed XML String |
static FSAuthnResponse |
parseAuthnResponseXML(java.lang.String xml)
Creates the FSAuthnResponse from XML string |
static FSAuthnResponse |
parseBASE64EncodedString(java.lang.String encodedRes)
Creates the FSAuthnResponse from BASE64 encoded string |
void |
setConsentURI(java.lang.String consent)
Sets consent URI |
void |
setID(java.lang.String id)
Sets id attribute. |
void |
setMinorVersion(int version)
Sets minor version |
void |
setProviderId(java.lang.String provId)
Sets provider ID for this response |
boolean |
setSignature(org.w3c.dom.Element elem)
Sets the Signature element |
void |
signXML(java.lang.String certAlias)
Signs the FSAuthnResponse . |
java.lang.String |
toBASE64EncodedString()
Gets the BASE64 encoded string representation of the 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 <samlp:Response> element. |
java.lang.String |
toXMLString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
Creates a String representation of the <samlp:Response> element. |
Methods inherited from class com.sun.identity.saml.protocol.Response |
addAssertion, getAssertion, getStatus, isSignatureValid, parseXML, parseXML, setStatus, signXML, 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 FSAuthnResponse(java.lang.String responseID, java.lang.String inResponseTo, Status status, java.util.List contents, java.lang.String relayState) throws SAMLException
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.relayState
- relay state for the response
SAMLException
- if error occurs.public FSAuthnResponse(org.w3c.dom.Element root) throws SAMLException, FSMsgException
root
- DOM Element representing the response object.
SAMLException
- if error occurs
FSMsgException
- if error occursMethod Detail |
public java.lang.String getID()
public void setID(java.lang.String id)
id
- id to be set.public java.lang.String getProviderId()
public void setProviderId(java.lang.String provId)
provId
- provider id to be setpublic java.lang.String getSignedXMLString()
FSAuthnResponse
is not signed.public java.lang.String getSignatureString()
FSAuthnResponse
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 java.lang.String getConsentURI()
public void setConsentURI(java.lang.String consent)
consent
- consent URI to be setpublic org.w3c.dom.Element getDOMElement()
FSAuthnResponse
object.
public static FSAuthnResponse parseAuthnResponseXML(java.lang.String xml) throws SAMLException, FSMsgException
FSAuthnResponse
from XML string
xml
- XML String representing the FSAuthnResponse
object
FSAuthnResponse
object
FSMsgException
- if unable to parse the XML string
SAMLException
- if unable to parse the XML stringpublic java.lang.String getRelayState()
public java.lang.String toXMLString() throws FSMsgException
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 FSAuthnResponse parseBASE64EncodedString(java.lang.String encodedRes) throws FSMsgException, SAMLException
FSAuthnResponse
from BASE64 encoded string
encodedRes
- BASE64 encoded string representing the response
FSAuthnResponse
object
SAMLException
- if unable to construct the object
FSMsgException
- if unable to construct the objectpublic java.lang.String toBASE64EncodedString() throws FSMsgException
FSMsgException
- if error occurspublic void signXML(java.lang.String certAlias) throws SAMLException
FSAuthnResponse
.
certAlias
- certificate alias which will be used for signing.
SAMLException
- if could not sign the FSAuthnResponse
public boolean setSignature(org.w3c.dom.Element elem)
setSignature
in class Response
elem
- Signature Element to be set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |