org.opensaml
Class SAMLAuthenticationStatement

java.lang.Object
  extended by org.opensaml.SAMLObject
      extended by org.opensaml.SAMLStatement
          extended by org.opensaml.SAMLSubjectStatement
              extended by org.opensaml.SAMLAuthenticationStatement
All Implemented Interfaces:
Cloneable

public class SAMLAuthenticationStatement
extends SAMLSubjectStatement
implements Cloneable

Represents a SAML Authentication Statement

Author:
Scott Cantor

Field Summary
static String AuthenticationMethod_HardwareToken
          The authentication was performed by means of an unspecified hardware token.
static String AuthenticationMethod_Kerberos
          The authentication was performed by means of the Kerberos protocol [RFC 1510], an instantiation of the Needham-Schroeder symmetric key authentication mechanism [Needham78].
static String AuthenticationMethod_Password
          The authentication was performed by means of a password.
static String AuthenticationMethod_PGP_PublicKey
          The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a PGP web of trust [PGP].
static String AuthenticationMethod_SPKI_PublicKey
          The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a SPKI PKI [SPKI].
static String AuthenticationMethod_SRP
          The authentication was performed by means of Secure Remote Password protocol as specified in [RFC 2945].
static String AuthenticationMethod_SSL_TLS_Client
          The authentication was performed using either the SSL or TLS protocol with certificate based client authentication.
static String AuthenticationMethod_Unspecified
          The authentication was performed by an unspecified means.
static String AuthenticationMethod_X509_PublicKey
          The authentication was performed by some (unspecified) mechanism on a key authenticated by means of an X.509 PKI [X.500][PKIX].
static String AuthenticationMethod_XKMS_PublicKey
          The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a XKMS trust service [XKMS].
static String AuthenticationMethod_XML_DSig
          The authentication was performed by means of an XML digital signature [RFC 3075].
protected  Date authInstant
           
protected  String authMethod
           
protected  ArrayList bindings
           
protected  String subjectDNS
           
protected  String subjectIP
           
 
Fields inherited from class org.opensaml.SAMLSubjectStatement
subject
 
Fields inherited from class org.opensaml.SAMLStatement
statementTypeMap
 
Fields inherited from class org.opensaml.SAMLObject
config, dirty, log, parentObject, root
 
Constructor Summary
SAMLAuthenticationStatement()
          Default constructor
SAMLAuthenticationStatement(Element e)
          Reconstructs a statement from a DOM tree
SAMLAuthenticationStatement(InputStream in)
          Reconstructs a statement from a stream
SAMLAuthenticationStatement(SAMLSubject subject, Date authInstant, String subjectIP, String subjectDNS, Collection bindings)
          Builds a statement out of its component parts
SAMLAuthenticationStatement(SAMLSubject subject, String authMethod, Date authInstant, String subjectIP, String subjectDNS, Collection bindings)
          Builds a statement out of its component parts
 
Method Summary
 void addBinding(SAMLAuthorityBinding binding)
          Adds SAML authority binding information
protected  Element buildRoot(Document doc, boolean xmlns)
          Delegates the process of building the root element of an object and inserting appropriate namespaces.
 void checkValidity()
          Evaluates the object's content to see if it is currently valid if serialized.
 Object clone()
          Copies a SAML object such that no dependencies exist between the original and the copy
 void fromDOM(Element e)
          Initialization of an object from a DOM element
 Date getAuthInstant()
          Gets the datetime of authentication
 String getAuthMethod()
          Gets the authentication method
 Iterator getBindings()
          Gets SAML authority binding information
 String getSubjectDNS()
          Gets the subject's DNS address
 String getSubjectIP()
          Gets the subject's IP address
 void removeBinding(int index)
          Removes a binding by position (zero-based)
 void setAuthInstant(Date authInstant)
          Sets the datetime of authentication
 void setAuthMethod(String authMethod)
          Sets the authentication method
 void setBindings(Collection bindings)
          Sets SAML authority binding information
 void setSubjectDNS(String subjectDNS)
          Sets the subject's DNS address
 void setSubjectIP(String subjectIP)
          Sets the subject's IP address
 Node toDOM(Document doc, boolean xmlns)
          Transforms the object into a DOM tree using an existing document context
 
Methods inherited from class org.opensaml.SAMLSubjectStatement
getSubject, setSubject
 
Methods inherited from class org.opensaml.SAMLStatement
getInstance, getInstance, regFactory, unregFactory
 
Methods inherited from class org.opensaml.SAMLObject
fromStream, fromStream, getParent, plantRoot, setDirty, setParent, toBase64, toDOM, toDOM, toDOM, toStream, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subjectIP

protected String subjectIP

subjectDNS

protected String subjectDNS

authMethod

protected String authMethod

authInstant

protected Date authInstant

bindings

protected ArrayList bindings

AuthenticationMethod_Password

public static final String AuthenticationMethod_Password
The authentication was performed by means of a password.

See Also:
Constant Field Values

AuthenticationMethod_Kerberos

public static final String AuthenticationMethod_Kerberos
The authentication was performed by means of the Kerberos protocol [RFC 1510], an instantiation of the Needham-Schroeder symmetric key authentication mechanism [Needham78].

See Also:
Constant Field Values

AuthenticationMethod_SRP

public static final String AuthenticationMethod_SRP
The authentication was performed by means of Secure Remote Password protocol as specified in [RFC 2945].

See Also:
Constant Field Values

AuthenticationMethod_HardwareToken

public static final String AuthenticationMethod_HardwareToken
The authentication was performed by means of an unspecified hardware token.

See Also:
Constant Field Values

AuthenticationMethod_SSL_TLS_Client

public static final String AuthenticationMethod_SSL_TLS_Client
The authentication was performed using either the SSL or TLS protocol with certificate based client authentication. TLS is described in [RFC 2246].

See Also:
Constant Field Values

AuthenticationMethod_X509_PublicKey

public static final String AuthenticationMethod_X509_PublicKey
The authentication was performed by some (unspecified) mechanism on a key authenticated by means of an X.509 PKI [X.500][PKIX]. It may have been one of the mechanisms for which a more specific identifier has been defined.

See Also:
Constant Field Values

AuthenticationMethod_PGP_PublicKey

public static final String AuthenticationMethod_PGP_PublicKey
The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a PGP web of trust [PGP]. It may have been one of the mechanisms for which a more specific identifier has been defined.

See Also:
Constant Field Values

AuthenticationMethod_SPKI_PublicKey

public static final String AuthenticationMethod_SPKI_PublicKey
The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a SPKI PKI [SPKI]. It may have been one of the mechanisms for which a more specific identifier has been defined.

See Also:
Constant Field Values

AuthenticationMethod_XKMS_PublicKey

public static final String AuthenticationMethod_XKMS_PublicKey
The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a XKMS trust service [XKMS]. It may have been one of the mechanisms for which a more specific identifier has been defined.

See Also:
Constant Field Values

AuthenticationMethod_XML_DSig

public static final String AuthenticationMethod_XML_DSig
The authentication was performed by means of an XML digital signature [RFC 3075].

See Also:
Constant Field Values

AuthenticationMethod_Unspecified

public static final String AuthenticationMethod_Unspecified
The authentication was performed by an unspecified means.

See Also:
Constant Field Values
Constructor Detail

SAMLAuthenticationStatement

public SAMLAuthenticationStatement()
Default constructor


SAMLAuthenticationStatement

public SAMLAuthenticationStatement(SAMLSubject subject,
                                   String authMethod,
                                   Date authInstant,
                                   String subjectIP,
                                   String subjectDNS,
                                   Collection bindings)
                            throws SAMLException
Builds a statement out of its component parts

Parameters:
subject - Subject of statement
authMethod - URI of authentication method
authInstant - Datetime of authentication
subjectIP - IP address of subject in dotted decimal notation (optional)
subjectDNS - DNS address of subject (optional)
bindings - Collection of SAMLAuthorityBinding objects to reference SAML responders (optional)
Throws:
SAMLException - Raised if a statement cannot be constructed from the supplied information

SAMLAuthenticationStatement

public SAMLAuthenticationStatement(SAMLSubject subject,
                                   Date authInstant,
                                   String subjectIP,
                                   String subjectDNS,
                                   Collection bindings)
                            throws SAMLException
Builds a statement out of its component parts

Parameters:
subject - Subject of statement
authInstant - Datetime of authentication
subjectIP - IP address of subject in dotted decimal notation (optional)
subjectDNS - DNS address of subject (optional)
bindings - Collection of SAMLAuthorityBinding objects to reference SAML responders (optional)
Throws:
SAMLException - Raised if a statement cannot be constructed from the supplied information

SAMLAuthenticationStatement

public SAMLAuthenticationStatement(Element e)
                            throws SAMLException
Reconstructs a statement from a DOM tree

Parameters:
e - The root of a DOM tree
Throws:
SAMLException - Thrown if the object cannot be constructed

SAMLAuthenticationStatement

public SAMLAuthenticationStatement(InputStream in)
                            throws SAMLException
Reconstructs a statement from a stream

Parameters:
in - A stream containing XML
Throws:
SAMLException - Raised if an exception occurs while constructing the object.
Method Detail

fromDOM

public void fromDOM(Element e)
             throws SAMLException
Description copied from class: SAMLObject
Initialization of an object from a DOM element

Overrides:
fromDOM in class SAMLSubjectStatement
Parameters:
e - Root element of a DOM tree
Throws:
SAMLException - Raised if an exception occurs while constructing the object
See Also:
SAMLObject.fromDOM(org.w3c.dom.Element)

getSubjectIP

public String getSubjectIP()
Gets the subject's IP address

Returns:
The subject's IP address in dotted decimal notation

setSubjectIP

public void setSubjectIP(String subjectIP)
Sets the subject's IP address

Parameters:
subjectIP - The subject's IP address

getSubjectDNS

public String getSubjectDNS()
Gets the subject's DNS address

Returns:
The subject's DNS address

setSubjectDNS

public void setSubjectDNS(String subjectDNS)
Sets the subject's DNS address

Parameters:
subjectDNS - The subject's DNS address

getAuthMethod

public String getAuthMethod()
Gets the authentication method

Returns:
The authentication method URI

setAuthMethod

public void setAuthMethod(String authMethod)
Sets the authentication method

Parameters:
authMethod - The authentication method URI

getAuthInstant

public Date getAuthInstant()
Gets the datetime of authentication

Returns:
The date and time of authentication

setAuthInstant

public void setAuthInstant(Date authInstant)
Sets the datetime of authentication

Parameters:
authInstant - The date and time of authentication

getBindings

public Iterator getBindings()
Gets SAML authority binding information

Returns:
An iterator of bindings

setBindings

public void setBindings(Collection bindings)
                 throws SAMLException
Sets SAML authority binding information

Parameters:
bindings - The bindings to include
Throws:
SAMLException - Raised if any of the bindings are invalid

addBinding

public void addBinding(SAMLAuthorityBinding binding)
                throws SAMLException
Adds SAML authority binding information

Parameters:
binding - The binding to add
Throws:
SAMLException - Raised if the binding is invalid

removeBinding

public void removeBinding(int index)
Removes a binding by position (zero-based)

Parameters:
index - The position of the binding to remove

buildRoot

protected Element buildRoot(Document doc,
                            boolean xmlns)
Description copied from class: SAMLObject
Delegates the process of building the root element of an object and inserting appropriate namespaces.

Specified by:
buildRoot in class SAMLObject
Parameters:
doc - The document context to use
xmlns - Include namespace(s) on root element?
Returns:
A new root element for the object
See Also:
SAMLObject.buildRoot(org.w3c.dom.Document,boolean)

toDOM

public Node toDOM(Document doc,
                  boolean xmlns)
           throws SAMLException
Description copied from class: SAMLObject
Transforms the object into a DOM tree using an existing document context

Overrides:
toDOM in class SAMLSubjectStatement
Parameters:
doc - A Document object to use in manufacturing the tree
xmlns - Include namespace(s) on root element?
Returns:
Root element node of the DOM tree capturing the object
Throws:
SAMLException - Raised if the object is incompletely defined
See Also:
SAMLObject.toDOM(org.w3c.dom.Document,boolean)

checkValidity

public void checkValidity()
                   throws SAMLException
Description copied from class: SAMLObject
Evaluates the object's content to see if it is currently valid if serialized. Does not evaluate embedded objects except on the basis of whether they exist. For example, an Assertion must have a Statement, but if an invalid statement is added, SAMLAssertion.checkValidity() would succeed, while SAMLStatement.checkValidity would raise an exception.

Overrides:
checkValidity in class SAMLSubjectStatement
Throws:
SAMLException - Raised if the serialized object would be invalid SAML, excluding any embedded objects
See Also:
SAMLObject.checkValidity()

clone

public Object clone()
             throws CloneNotSupportedException
Copies a SAML object such that no dependencies exist between the original and the copy

Overrides:
clone in class SAMLSubjectStatement
Returns:
The new object
Throws:
CloneNotSupportedException
See Also:
Object.clone()


Copyright ? 2005 UCAID. All Rights Reserved.