com.sun.identity.federation.message
Class FSAuthnRequestEnvelope

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

public class FSAuthnRequestEnvelope
extends Object

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


Constructor Summary
FSAuthnRequestEnvelope()
          Default Constructor.
FSAuthnRequestEnvelope(Element root)
          Constructs a new FSAuthnRequestEnvelope object from a Document Element.
FSAuthnRequestEnvelope(FSAuthnRequest authnRequest, String providerID, String providerName, String assertionConsumerServiceURL, FSIDPList idpList, boolean isPassive)
          Constructs a new FSAuthnRequestEnvelope object.
 
Method Summary
 String getAssertionConsumerServiceURL()
          Returns the value of AssertionConsumerServiceURL attribute.
 FSAuthnRequest getAuthnRequest()
          Returns the FSAuthnRequest object.
 FSIDPList getIDPList()
          Returns the FSIDPList object.
 int getMinorVersion()
          Returns the value of MinorVersion property.
 List getOtherElements()
          Returns a list of elements.
static FSAuthnRequestEnvelope parseBASE64EncodedString(String encodedReq)
          Returns FSAuthnRequestEnvelope object.
static FSAuthnRequestEnvelope parseXML(String xml)
          Returns the FSAuthnRequestEnvelope object.
 void setAssertionConsumerServiceURL(String assertionConsumerURL)
          Sets the value of AssertionConsumerServiceURL attribute.
 void setAuthnRequest(FSAuthnRequest authnRequest)
          Sets the FSAuthnRequest object.
 void setIDPList(FSIDPList idpList)
          Sets the FSIDPList object.
 void setMinorVersion(int minorVersion)
          Sets the value of MinorVersion property.
 void setOtherElements(List otherElements)
          Sets a list of elements.
 String toBASE64EncodedString()
          Returns a Base64 Encoded Authentication Request String.
 String toXMLString()
          Returns the request as an XML Document String based on the Liberty Request schema.
 String toXMLString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <lib:AuthnRequest> element.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Creates a String representation of the <lib:AuthnRequest> element.
 

Constructor Detail

FSAuthnRequestEnvelope

public FSAuthnRequestEnvelope()
Default Constructor.


FSAuthnRequestEnvelope

public FSAuthnRequestEnvelope(FSAuthnRequest authnRequest,
                              String providerID,
                              String providerName,
                              String assertionConsumerServiceURL,
                              FSIDPList idpList,
                              boolean isPassive)
Constructs a new FSAuthnRequestEnvelope object.

Parameters:
authnRequest - the authentication request
providerID - the provider's identifier
providerName - name of the provider
assertionConsumerServiceURL - absolute url of the assertion consumer service
idpList - list of identity providers
isPassive - true if identity provider must not interact with the Principal.

FSAuthnRequestEnvelope

public FSAuthnRequestEnvelope(Element root)
                       throws FSMsgException
Constructs a new FSAuthnRequestEnvelope object from a Document Element.

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

getMinorVersion

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

Returns:
the value of MinorVersion property.

setMinorVersion

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

Parameters:
minorVersion - the value of MinorVersion property.
See Also:
FSAuthnRequestEnvelope.setMinorVersion(int)

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns the request as an XML Document String based on the Liberty Request schema.

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

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Creates a String representation of the <lib:AuthnRequest> element.

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:
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 <lib:AuthnRequest> element.

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 element.
Throws:
FSMsgException - if there is an error.
FSMsgException

parseXML

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

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

getAssertionConsumerServiceURL

public String getAssertionConsumerServiceURL()
Returns the value of AssertionConsumerServiceURL attribute.

Returns:
the value of AssertionConsumerServiceURL attribute.
See Also:
FSAuthnRequestEnvelope.setAssertionConsumerServiceURL(String)

setAssertionConsumerServiceURL

public void setAssertionConsumerServiceURL(String assertionConsumerURL)
Sets the value of AssertionConsumerServiceURL attribute.

Parameters:
assertionConsumerURL - the value of AssertionConsumerServiceURL attribute.
See Also:
FSAuthnRequestEnvelope.getAssertionConsumerServiceURL()

getAuthnRequest

public FSAuthnRequest getAuthnRequest()
Returns the FSAuthnRequest object.

Returns:
the FSAuthnRequest object.
See Also:
FSAuthnRequestEnvelope.setAuthnRequest(FSAuthnRequest)

setAuthnRequest

public void setAuthnRequest(FSAuthnRequest authnRequest)
Sets the FSAuthnRequest object.

Parameters:
authnRequest - the FSAuthnRequest object.
See Also:
FSAuthnRequestEnvelope.getAuthnRequest()

getIDPList

public FSIDPList getIDPList()
Returns the FSIDPList object. return the FSIDPList object.

See Also:
FSAuthnRequestEnvelope.setIDPList(FSIDPList)

setIDPList

public void setIDPList(FSIDPList idpList)
Sets the FSIDPList object.

Parameters:
idpList - the FSIDPList object.
See Also:
FSAuthnRequestEnvelope.getIDPList()

getOtherElements

public List getOtherElements()
Returns a list of elements.

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

setOtherElements

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

Parameters:
otherElements - a list of elements.
See Also:
FSAuthnRequestEnvelope.getOtherElements()

parseBASE64EncodedString

public static FSAuthnRequestEnvelope parseBASE64EncodedString(String encodedReq)
                                                       throws FSMsgException
Returns FSAuthnRequestEnvelope object. The object is created by parsing an Base64 encode authentication request String.

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

toBASE64EncodedString

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

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