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

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

public class AuthnContext
extends Object

This class AuthnContext represents an Authentication Context for the authenticated user with a requested authn context.


Field Summary
protected  String authnContextClassRef
           
protected  String authnContextStatementRef
           
protected  int minorVersion
           
 
Constructor Summary
AuthnContext()
          Default constructor
AuthnContext(Element root)
          Constructor creates AuthnContext object from the Document Element.
AuthnContext(String authnContextClassRef, String authnContextStatementRef)
          Constructor creates AuthnContext object.
 
Method Summary
 String getAuthnContextClassRef()
          Returns the AuthnContext Class Reference URI.
 String getAuthnContextStatementRef()
          Returns the AuthnContext Statement Reference URI.
 int getMinorVersion()
          Returns the MinorVersion attribute.
 void setAuthnContextClassRef(String authnContextClassRef)
          Sets the AuthnContext Class Reference URI.
 void setAuthnContextStatementRef(String authnContextStatementRef)
          Sets AuthnContext Statement Reference URI.
 void setMinorVersion(int version)
          Sets the MinorVersion.
 String toXMLString()
          Returns the string representation of this object.
 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 this object.
 

Field Detail

authnContextClassRef

protected String authnContextClassRef

authnContextStatementRef

protected String authnContextStatementRef

minorVersion

protected int minorVersion
Constructor Detail

AuthnContext

public AuthnContext()
Default constructor


AuthnContext

public AuthnContext(String authnContextClassRef,
                    String authnContextStatementRef)
Constructor creates AuthnContext object.

Parameters:
authnContextClassRef - Authentication Context Class Reference URI
authnContextStatementRef - Authentication Context Statement Reference URI

AuthnContext

public AuthnContext(Element root)
             throws FSMsgException
Constructor creates AuthnContext object from the Document Element.

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

getAuthnContextClassRef

public String getAuthnContextClassRef()
Returns the AuthnContext Class Reference URI.

Returns:
the AuthnContext Class Reference URI.
See Also:
AuthnContext.setAuthnContextClassRef(java.lang.String)

setAuthnContextClassRef

public void setAuthnContextClassRef(String authnContextClassRef)
Sets the AuthnContext Class Reference URI.

Parameters:
authnContextClassRef - AuthnContext Class Ref URI.
See Also:
AuthnContext.getAuthnContextClassRef()

getAuthnContextStatementRef

public String getAuthnContextStatementRef()
Returns the AuthnContext Statement Reference URI.

Returns:
the AuthnContext Statement Reference URI.
See Also:
AuthnContext.setAuthnContextStatementRef(java.lang.String)

setAuthnContextStatementRef

public void setAuthnContextStatementRef(String authnContextStatementRef)
Sets AuthnContext Statement Reference URI.

Parameters:
authnContextStatementRef - AuthnContext Statement Ref URI.
See Also:
AuthnContext.getAuthnContextStatementRef()

getMinorVersion

public int getMinorVersion()
Returns the MinorVersion attribute.

Returns:
the Minor Version.
See Also:
AuthnContext.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int version)
Sets the MinorVersion.

Parameters:
version - the minor version in the assertion.
See Also:
AuthnContext.setMinorVersion(int)

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns the string representation of this object. This method translates the response to an XML document string.

Returns:
An XML String representing the response. NOTE: this is a complete SAML response xml string with ResponseID, MajorVersion, etc.
Throws:
FSMsgException

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

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS,
                          boolean includeHeader)
                   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.
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.