rabbit.filter.authenticate
Class PlainFileAuthenticator

java.lang.Object
  extended by rabbit.filter.authenticate.PlainFileAuthenticator
All Implemented Interfaces:
Authenticator

public class PlainFileAuthenticator
extends Object
implements Authenticator

An authenticator that reads username and passwords from a plain text file.

Author:
Robert Olofsson

Constructor Summary
PlainFileAuthenticator(SProperties props)
           
 
Method Summary
 boolean authenticate(String user, String pwd)
          Try to authenticate the user.
 String getToken(HttpHeader header, Connection con)
          Find the token used to authenticate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainFileAuthenticator

public PlainFileAuthenticator(SProperties props)
Method Detail

getToken

public String getToken(HttpHeader header,
                       Connection con)
Description copied from interface: Authenticator
Find the token used to authenticate

Specified by:
getToken in interface Authenticator

authenticate

public boolean authenticate(String user,
                            String pwd)
Description copied from interface: Authenticator
Try to authenticate the user.

Specified by:
authenticate in interface Authenticator
Parameters:
user - the username
pwd - the password of the user
Returns:
true if authentication succeeded, false otherwise.