org.jasig.cas.adaptors.generic
Class FileAuthenticationHandler

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.FileAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler, NamedAuthenticationHandler

public class FileAuthenticationHandler
extends AbstractUsernamePasswordAuthenticationHandler

Class designed to read data from a file in the format of USERNAME SEPARATOR PASSWORD that will go line by line and look for the username. If it finds the username it will compare the supplied password (first put through a PasswordTranslator) that is compared to the password provided in the file. If there is a match, the user is authenticated. Note that the default password translator is a plaintext password translator and the default separator is "::" (without quotes).

Since:
3.0
Version:
$Revision: 48180 $ $Date: 2010-03-14 00:05:58 -0500 (Sun, 14 Mar 2010) $
Author:
Scott Battaglia

Field Summary
 
Fields inherited from class org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler
log
 
Constructor Summary
FileAuthenticationHandler()
           
 
Method Summary
protected  boolean authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials)
           
 void setFileName(org.springframework.core.io.Resource fileName)
           
 void setSeparator(java.lang.String separator)
           
 
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

FileAuthenticationHandler

public FileAuthenticationHandler()
Method Detail

authenticateUsernamePasswordInternal

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

setFileName

public final void setFileName(org.springframework.core.io.Resource fileName)
Parameters:
fileName - The fileName to set.

setSeparator

public final void setSeparator(java.lang.String separator)
Parameters:
separator - The separator to set.


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