org.jasig.cas.authentication
Class ImmutableAuthentication

java.lang.Object
  extended by org.jasig.cas.authentication.AbstractAuthentication
      extended by org.jasig.cas.authentication.ImmutableAuthentication
All Implemented Interfaces:
java.io.Serializable, Authentication

public final class ImmutableAuthentication
extends AbstractAuthentication

Default implementation of Authentication interface. ImmutableAuthentication is an immutable object and thus its attributes cannot be changed.

Instanciators of the ImmutableAuthentication class must take care that the map they provide is serializable (i.e. HashMap).

Since:
3.0
Version:
$Revision: 42053 $ $Date: 2007-06-10 09:17:55 -0400 (Sun, 10 Jun 2007) $
Author:
Dmitriy Kopylenko, Scott Battaglia
See Also:
Serialized Form

Constructor Summary
ImmutableAuthentication(Principal principal)
          Constructor that assumes there are no additional authentication attributes.
ImmutableAuthentication(Principal principal, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Constructor that accepts both a principal and a map.
 
Method Summary
 java.util.Date getAuthenticatedDate()
          Method to retrieve the timestamp of when this Authentication object was created.
 
Methods inherited from class org.jasig.cas.authentication.AbstractAuthentication
equals, getAttributes, getPrincipal, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableAuthentication

public ImmutableAuthentication(Principal principal,
                               java.util.Map<java.lang.String,java.lang.Object> attributes)
Constructor that accepts both a principal and a map.

Parameters:
principal - Principal representing user
attributes - Authentication attributes map.
Throws:
java.lang.IllegalArgumentException - if the principal is null.

ImmutableAuthentication

public ImmutableAuthentication(Principal principal)
Constructor that assumes there are no additional authentication attributes.

Parameters:
principal - the Principal representing the authenticated entity.
Method Detail

getAuthenticatedDate

public java.util.Date getAuthenticatedDate()
Description copied from interface: Authentication
Method to retrieve the timestamp of when this Authentication object was created.

Returns:
the date/time the authentication occurred.


Copyright © 2004-2010 Java Architectures Special Interest Group. All Rights Reserved.