org.opensaml
Class SAMLAuthenticationStatement

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

public class SAMLAuthenticationStatement
extends SAMLSubjectStatement
implements java.lang.Cloneable

Represents a SAML Authentication Statement

Author:
Scott Cantor

Field Summary
static java.lang.String AuthenticationMethod_HardwareToken
          The authentication was performed by means of an unspecified hardware token.
static java.lang.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 java.lang.String AuthenticationMethod_Password
          The authentication was performed by means of a password.
static java.lang.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 java.lang.String AuthenticationMethod_SPKI_PublicKey
          The authentication was performed by some (unspecified) mechanism on a key authenticated by means of a SPKI PKI [SPKI].
static java.lang.String AuthenticationMethod_SRP
          The authentication was performed by means of Secure Remote Password protocol as specified in [RFC 2945].
static java.lang.String AuthenticationMethod_SSL_TLS_Client
          The authentication was performed using either the SSL or TLS protocol with certificate based client authentication.
static java.lang.String AuthenticationMethod_Unspecified
          The authentication was performed by an unspecified means.
static java.lang.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 java.lang.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 java.lang.String AuthenticationMethod_XML_DSig
          The authentication was performed by means of an XML digital signature [RFC 3075].
protected  java.util.Date authInstant
           
protected  java.lang.String authMethod
           
protected  java.util.ArrayList bindings
           
protected  java.lang.String subjectDNS
           
protected  java.lang.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, log, root
 
Constructor Summary
SAMLAuthenticationStatement()
          Default constructor
SAMLAuthenticationStatement(org.w3c.dom.Element e)
          Reconstructs a statement from a DOM tree
SAMLAuthenticationStatement(java.io.InputStream in)
          Reconstructs a statement from a stream
SAMLAuthenticationStatement(SAMLSubject subject, java.util.Date authInstant, java.lang.String subjectIP, java.lang.String subjectDNS, java.util.Collection bindings)
          Builds a statement out of its component parts
SAMLAuthenticationStatement(SAMLSubject subject, java.lang.String authMethod, java.util.Date authInstant, java.lang.String subjectIP, java.lang.String subjectDNS, java.util.Collection bindings)
          Builds a statement out of its component parts
 
Method Summary
 void addBinding(SAMLAuthorityBinding binding)
          Adds SAML authority binding information
 void checkValidity()
          Evaluates the object's content to see if it is currently valid if serialized.
 java.lang.Object clone()
          Copies a SAML object such that no dependencies exist between the original and the copy
 void fromDOM(org.w3c.dom.Element e)
          Initialization of an object from a DOM element
 java.util.Date getAuthInstant()
          Gets the datetime of authentication
 java.lang.String getAuthMethod()
          Gets the authentication method
 java.util.Iterator getBindings()
          Gets SAML authority binding information
 java.lang.String getSubjectDNS()
          Gets the subject's DNS address
 java.lang.String getSubjectIP()
          Gets the subject's IP address
 void removeBinding(int index)
          Removes a binding by position (zero-based)
 void setAuthInstant(java.util.Date authInstant)
          Sets the datetime of authentication
 void setAuthMethod(java.lang.String authMethod)
          Sets the authentication method
 void setBindings(java.util.Collection bindings)
          Sets SAML authority binding information
 void setSubjectDNS(java.lang.String subjectDNS)
          Sets the subject's DNS address
 void setSubjectIP(java.lang.String subjectIP)
          Sets the subject's IP address
 org.w3c.dom.Node toDOM(org.w3c.dom.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, plantRoot, 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 java.lang.String subjectIP

subjectDNS

protected java.lang.String subjectDNS

authMethod

protected java.lang.String authMethod

authInstant

protected java.util.Date authInstant

bindings

protected java.util.ArrayList bindings

AuthenticationMethod_Password

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

See Also:
Constant Field Values

AuthenticationMethod_Kerberos

public static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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,
                                   java.lang.String authMethod,
                                   java.util.Date authInstant,
                                   java.lang.String subjectIP,
                                   java.lang.String subjectDNS,
                                   java.util.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,
                                   java.util.Date authInstant,
                                   java.lang.String subjectIP,
                                   java.lang.String subjectDNS,
                                   java.util.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(org.w3c.dom.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(java.io.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(org.w3c.dom.Element e)
             throws SAMLException
Description copied from class: SAMLObject
Initialization of an object from a DOM element

Overrides:
fromDOM in class SAMLSubjectStatement
Throws:
SAMLException
See Also:
SAMLObject.fromDOM(org.w3c.dom.Element)

getSubjectIP

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

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

setSubjectIP

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

Parameters:
subjectIP - The subject's IP address

getSubjectDNS

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

Returns:
The subject's DNS address

setSubjectDNS

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

Parameters:
subjectDNS - The subject's DNS address

getAuthMethod

public java.lang.String getAuthMethod()
Gets the authentication method

Returns:
The authentication method URI

setAuthMethod

public void setAuthMethod(java.lang.String authMethod)
Sets the authentication method

Parameters:
authMethod - The authentication method URI

getAuthInstant

public java.util.Date getAuthInstant()
Gets the datetime of authentication

Returns:
The date and time of authentication

setAuthInstant

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

Parameters:
authInstant - The date and time of authentication

getBindings

public java.util.Iterator getBindings()
Gets SAML authority binding information

Returns:
An iterator of bindings

setBindings

public void setBindings(java.util.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

toDOM

public org.w3c.dom.Node toDOM(org.w3c.dom.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 SAMLObject
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.isValid() would succeed, while SAMLStatement.isValid would raise an exception.

Overrides:
checkValidity in class SAMLSubjectStatement
Throws:
SAMLException
See Also:
SAMLObject.checkValidity()

clone

public java.lang.Object clone()
                       throws java.lang.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:
java.lang.CloneNotSupportedException
See Also:
Object.clone()


Copyright ? 2002 UCAID. All Rights Reserved.