com.sun.identity.federation.message.common
Class RequestAuthnContext

java.lang.Object
  extended by com.sun.identity.federation.message.common.RequestAuthnContext

public class RequestAuthnContext
extends Object

This class RequestAuthnContext represents the requesting Authentication Context as part of the FSAuthnRequest.


Constructor Summary
RequestAuthnContext()
          Default constructor.
RequestAuthnContext(Element root)
          Constructor to create RequestAuthnContext object from Docuemnt Element.
RequestAuthnContext(List authnContextClassRefList, List authnContextStatementRefList, String authnContextComparison)
          Constructor to create RequestAuthnContext object.
 
Method Summary
 List getAuthnContextClassRefList()
          Returns List of AuthnContext Class References.
 String getAuthnContextComparison()
          Returns the AuthnContext Comparison type.
 List getAuthnContextStatementRefList()
          Returns a List of AuthnContext Statement References.
 int getMinorVersion()
          Returns the MinorVersion.
static RequestAuthnContext parseURLEncodedRequest(HttpServletRequest request, int minorVersion)
          Returns RequestAuthnContext object.
 void setAuthnContextClassRefList(List authnContextClassRefList)
          Sets a List of AuthnContext Class References.
 void setAuthnContextComparison(String authnContextComparison)
          Sets the AuthnContext comparison type.
 void setAuthnContextStatementRefList(List authnContextStatementRefList)
          Sets a List of AuthnContext Statement References.
 void setMinorVersion(int minorVersion)
          Sets the MinorVersion.
 String toURLEncodedQueryString()
          Returns an URL Encoded String.
 String toXMLString()
          Returns a String representation of the Logout Response.
 String toXMLString(boolean includeNS, boolean declareNS)
          Returns a String representation of this object.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Returns a String representation of the Logout Response.
 

Constructor Detail

RequestAuthnContext

public RequestAuthnContext(List authnContextClassRefList,
                           List authnContextStatementRefList,
                           String authnContextComparison)
Constructor to create RequestAuthnContext object.

Parameters:
authnContextClassRefList - Ordered list of AuthnContext Classes Refs.
authnContextStatementRefList - Ordered list of AuthnContext Statement Refs. Note: authnContextClassRefList and authContextStatementRefList are mutually exclusive lists.
authnContextComparison - AuthnContext Comparison Type. Possible values are exact, minimum, better and maximum.

RequestAuthnContext

public RequestAuthnContext()
Default constructor.


RequestAuthnContext

public RequestAuthnContext(Element root)
                    throws FSMsgException
Constructor to create RequestAuthnContext object from Docuemnt Element.

Parameters:
root - the Document Element.
Throws:
FSMsgException - on error.
Method Detail

getAuthnContextClassRefList

public List getAuthnContextClassRefList()
Returns List of AuthnContext Class References.

Returns:
List of AuthnContext Class Reference classes.
See Also:
RequestAuthnContext.setAuthnContextClassRefList(List)

setAuthnContextClassRefList

public void setAuthnContextClassRefList(List authnContextClassRefList)
Sets a List of AuthnContext Class References.

Parameters:
authnContextClassRefList - a List of AuthnContext Class References.
See Also:
RequestAuthnContext.getAuthnContextClassRefList()

getAuthnContextStatementRefList

public List getAuthnContextStatementRefList()
Returns a List of AuthnContext Statement References.

Returns:
a List of AuthnContext Statement References.
See Also:
RequestAuthnContext.setAuthnContextStatementRefList(List)

setAuthnContextStatementRefList

public void setAuthnContextStatementRefList(List authnContextStatementRefList)
Sets a List of AuthnContext Statement References.

Parameters:
authnContextStatementRefList - a List of AuthnContext Statement References.
See Also:
RequestAuthnContext.getAuthnContextStatementRefList()

getAuthnContextComparison

public String getAuthnContextComparison()
Returns the AuthnContext Comparison type.

Returns:
authnContextComparison the AuthnContext Comparison type.
See Also:
RequestAuthnContext.setAuthnContextComparison(String)

setAuthnContextComparison

public void setAuthnContextComparison(String authnContextComparison)
Sets the AuthnContext comparison type.

Parameters:
authnContextComparison - the AuthnContext comparison type.
See Also:
RequestAuthnContext.getAuthnContextComparison()

getMinorVersion

public int getMinorVersion()
Returns the MinorVersion.

Returns:
the MinorVersion.
See Also:
RequestAuthnContext.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the MinorVersion.

Parameters:
minorVersion - the MinorVersion.
See Also:
RequestAuthnContext.getMinorVersion()

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns a String representation of the Logout Response.

Returns:
a string containing the valid XML for this element
Throws:
FSMsgException - if there is an error converting this object ot a string.

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Returns a String representation of this 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 converting this object to a string.

toXMLString

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

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 converting this object ot a string.

parseURLEncodedRequest

public static RequestAuthnContext parseURLEncodedRequest(HttpServletRequest request,
                                                         int minorVersion)
                                                  throws FSMsgException
Returns RequestAuthnContext object. The object is creating by parsing the HttpServletRequest object.

Parameters:
request - the HttpServletRequest object.
Returns:
object.
Throws:
FSMsgException - if there is an error creating RequestAuthnContext object.

toURLEncodedQueryString

public String toURLEncodedQueryString()
                               throws FSMsgException
Returns an URL Encoded String.

Returns:
a url encoded query string.
Throws:
FSMsgException - if there is an error.