org.jasig.cas.adaptors.generic
Class AcceptUsersAuthenticationHandler

java.lang.Object
  extended by org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
      extended by org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
          extended by org.jasig.cas.adaptors.generic.AcceptUsersAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler, NamedAuthenticationHandler

public class AcceptUsersAuthenticationHandler
extends AbstractUsernamePasswordAuthenticationHandler

Handler that contains a list of valid users and passwords. Useful if there is a small list of users that we wish to allow. An example use case may be if there are existing handlers that make calls to LDAP, etc. but there is a need for additional users we don't want in LDAP. With the chain of command processing of handlers, this handler could be added to check before LDAP and provide the list of additional users. The list of acceptable users is stored in a map. The key of the map is the username and the password is the object retrieved from doing map.get(KEY).

Note that this class makes an unmodifiable copy of whatever map is provided to it.

Since:
3.0
Version:
$Revision: 47522 $ $Date: 2009-12-14 23:33:36 -0500 (Mon, 14 Dec 2009) $
Author:
Scott Battaglia

Field Summary
 
Fields inherited from class org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
log
 
Constructor Summary
AcceptUsersAuthenticationHandler()
           
 
Method Summary
protected  boolean authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials)
           
 void setUsers(java.util.Map<java.lang.String,java.lang.String> users)
           
 
Methods inherited from class org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
doAuthentication, getPasswordEncoder, getPrincipalNameTransformer, setClassToSupport, setPasswordEncoder, setPrincipalNameTransformer, setSupportSubClasses, supports
 
Methods inherited from class org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
authenticate, getName, postAuthenticate, preAuthenticate, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptUsersAuthenticationHandler

public AcceptUsersAuthenticationHandler()
Method Detail

authenticateUsernamePasswordInternal

protected final boolean authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials)
Specified by:
authenticateUsernamePasswordInternal in class AbstractUsernamePasswordAuthenticationHandler

setUsers

public final void setUsers(java.util.Map<java.lang.String,java.lang.String> users)
Parameters:
users - The users to set.


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