com.sun.identity.federation.message
Class FSAuthnResponseEnvelope

java.lang.Object
  extended by com.sun.identity.federation.message.FSAuthnResponseEnvelope

public class FSAuthnResponseEnvelope
extends Object

This class defines methods for setting and retrieving attributes and elements associated with a Liberty Response .


Constructor Summary
FSAuthnResponseEnvelope()
          Default Constructor.
FSAuthnResponseEnvelope(Element root)
          Constructor create FSAuthnResponseEnvelope object.
FSAuthnResponseEnvelope(FSAuthnResponse authnResponse)
          Constructor create FSAuthnResponseEnvelope object.
 
Method Summary
 String getAssertionConsumerServiceURL()
          Returns the Assertion Consumer Service URL.
 FSAuthnResponse getAuthnResponse()
          Returns the FSAuthnResponse object.
 int getMinorVersion()
          Returns the value of MinorVersion attribute.
 List getOtherElements()
          Returns a list of elements.
static FSAuthnResponseEnvelope parseBASE64EncodedString(String encodedReq)
          Returns FSAuthnResponseEnvelope object.
static FSAuthnResponseEnvelope parseXML(String xml)
          Returns the FSAuthnResponseEnvelope object.
 void setAssertionConsumerServiceURL(String assertionConsumerUrl)
          Sets the Assertion Consumer Service URL.
 void setAuthnResponse(FSAuthnResponse authnResponse)
          Sets the FSAuthnResponse object.
 void setMinorVersion(int minorVersion)
          Sets the value of MinorVersion attribute.
 void setOtherElements(List otherElement)
          Sets a list of elements.
 String toBASE64EncodedString()
          Returns a Base64 Encoded String.
 String toXMLString()
          Returns XML document String for this object based on the Response Schema.
 String toXMLString(boolean includeNS, boolean declareNS)
          Creates a String representation of the Response object.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Creates a String representation of the Response object.
 

Constructor Detail

FSAuthnResponseEnvelope

public FSAuthnResponseEnvelope()
Default Constructor.


FSAuthnResponseEnvelope

public FSAuthnResponseEnvelope(FSAuthnResponse authnResponse)
Constructor create FSAuthnResponseEnvelope object.

Parameters:
authnResponse - the FSAuthnResponse object.

FSAuthnResponseEnvelope

public FSAuthnResponseEnvelope(Element root)
                        throws FSMsgException,
                               SAMLException
Constructor create FSAuthnResponseEnvelope object.

Parameters:
root - the Document element .
Throws:
FSMsgException - if there is an error creating the object.
SAMLException - if there is an error creating the object.
Method Detail

getMinorVersion

public int getMinorVersion()
Returns the value of MinorVersion attribute.

Returns:
the value of MinorVersion attribute.
See Also:
FSAuthnResponseEnvelope.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the value of MinorVersion attribute.

Parameters:
minorVersion - the MinorVersion attribute.

getOtherElements

public List getOtherElements()
Returns a list of elements.

Returns:
list of elements.
See Also:
FSAuthnResponseEnvelope.setOtherElements(List)

setOtherElements

public void setOtherElements(List otherElement)
Sets a list of elements.

Parameters:
otherElement - a list of elements.
See Also:
FSAuthnResponseEnvelope.getOtherElements()

getAuthnResponse

public FSAuthnResponse getAuthnResponse()
Returns the FSAuthnResponse object.

Returns:
the FSAuthnResponse object.
See Also:
FSAuthnResponseEnvelope.setAuthnResponse(FSAuthnResponse)

setAuthnResponse

public void setAuthnResponse(FSAuthnResponse authnResponse)
Sets the FSAuthnResponse object.

Parameters:
authnResponse - the FSAuthnResponse object.
See Also:
FSAuthnResponseEnvelope.getAuthnResponse()

getAssertionConsumerServiceURL

public String getAssertionConsumerServiceURL()
Returns the Assertion Consumer Service URL.

Returns:
the Assertion Consumer Service URL.
See Also:
FSAuthnResponseEnvelope.setAssertionConsumerServiceURL(String)

setAssertionConsumerServiceURL

public void setAssertionConsumerServiceURL(String assertionConsumerUrl)
Sets the Assertion Consumer Service URL.

Parameters:
assertionConsumerUrl - the Assertion Consumer Service Identifier.
See Also:
FSAuthnResponseEnvelope.getAssertionConsumerServiceURL()

parseXML

public static FSAuthnResponseEnvelope parseXML(String xml)
                                        throws FSMsgException
Returns the FSAuthnResponseEnvelope object.

Parameters:
xml - the XML string to create this object from
Returns:
FSAuthnResponseEnvelope object.
Throws:
FSMsgException - if there is error creating the object.

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns XML document String for this object based on the Response Schema.

Returns:
XML String representing the Response
Throws:
FSMsgException - if there is an error.

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Creates a String representation of the Response object.

Parameters:
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.
Returns:
A string containing the valid XML for this element.
Throws:
FSMsgException - if there is an error.

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS,
                          boolean includeHeader)
                   throws FSMsgException
Creates a String representation of the Response object.

Parameters:
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.
Returns:
a string containing the valid XML for this object.
Throws:
FSMsgException - if there is an error.

toBASE64EncodedString

public String toBASE64EncodedString()
                             throws FSMsgException
Returns a Base64 Encoded String.

Returns:
a Base64 Encoded String.
Throws:
FSMsgException - if there is an error encoding the string.

parseBASE64EncodedString

public static FSAuthnResponseEnvelope parseBASE64EncodedString(String encodedReq)
                                                        throws FSMsgException
Returns FSAuthnResponseEnvelope object. The object is creating by parsing the Base64 encoded XML string.

Parameters:
encodedReq - the Based64 encoded XML string.
Throws:
FSMsgException - if there is an error creating FSAuthnResponseEnvelope object.