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)
          Create a new PlainFileAuthenticator that will be configured using the given properties.
 
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)
Create a new PlainFileAuthenticator that will be configured using the given properties.

Parameters:
props - the configuration for this authenticator
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
Parameters:
header - the request
con - the Connection handling the request
Returns:
the authentication token

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.