|
|||||||||
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
public class FSAuthnResponse
The class FSAuthnResponse
creates and parses the
Liberty Response. This class extends the SAML
Response
.
Field Summary | |
---|---|
protected String |
consentURI
|
protected Element |
domElement
|
protected String |
id
|
protected int |
minorVersion
|
protected String |
relayState
|
Fields inherited from class com.sun.identity.saml.protocol.Response |
---|
assertions, issuer, signatureString, status, xmlString |
Fields inherited from class com.sun.identity.saml.protocol.AbstractResponse |
---|
inResponseTo, issueInstant, majorVersion, recipient, responseID, signature, signed, valid, validationDone |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
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 |
Field Detail |
---|
protected String relayState
protected String consentURI
protected int minorVersion
protected String id
protected Element domElement
Constructor Detail |
---|
public FSAuthnResponse(String responseID, String inResponseTo, Status status, List contents, String relayState) throws SAMLException, FSMsgException
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.public FSAuthnResponse(Element root) throws SAMLException, FSMsgException
FSAuthnResponse
object from
Document Element.
root
- the Document Element
SAMLException
- on error.
FSMsgException
- on error.Method Detail |
---|
public static FSAuthnResponse parseAuthnResponseXML(String xml) throws SAMLException, FSMsgException
FSAuthnResponse
object from XML Schema.
xml
- the XML Schema for this object.
SAMLException
- on error.
FSMsgException
- on error.
SAMLException
public String getID()
id
attribute.
id
attribute.FSAuthnResponse.setID(String)
public void setID(String id)
id
attribute.
id
- the new value of id
attribute.FSAuthnResponse.getID()
public String getProviderId()
ProviderID
attribute value.
ProviderID
attribute.FSAuthnResponse.setProviderId(String)
public void setProviderId(String provId)
ProviderID
attribute value.
provId
- new value of ProviderID
attribute.FSAuthnResponse.getProviderId()
public String getSignedXMLString()
public String getSignatureString()
public int getMinorVersion()
MinorVersion
attribute.
getMinorVersion
in class AbstractResponse
MinorVersion
attribute.FSAuthnResponse.setMinorVersion(int)
public void setMinorVersion(int version)
MajorVersion
attribute.
setMinorVersion
in class AbstractResponse
version
- the value of MajorVersion
attribute.FSAuthnResponse.getMinorVersion()
public String getConsentURI()
consent
attribute.
consent
attribute.FSAuthnResponse.setConsentURI(String)
public void setConsentURI(String consent)
consent
attribute.
consent
- new value of consent
attribute.FSAuthnResponse.getConsentURI()
public Element getDOMElement()
public String getRelayState()
RelayState
attribute in the Response.
RelayState
attribute in the Response.public String toXMLString() throws FSMsgException
FSMsgException
public 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
public 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
public static FSAuthnResponse parseBASE64EncodedString(String encodedRes) throws FSMsgException, SAMLException
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.public String toBASE64EncodedString() throws FSMsgException
Base64
encoded string representing this
object.
Base64
encoded string representing this
object.
FSMsgException
- if there is an error creating
a Base64
encoded string.public void signXML(String certAlias) throws SAMLException
Response
.
certAlias
- the Certificate Alias
SAMLException
- if Response
cannot be signed.public boolean setSignature(Element elem)
Element
signature.
setSignature
in class Response
elem
- the Element
object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |