rabbit.filter.authenticate
Class SQLAuthenticator

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

public class SQLAuthenticator
extends Object
implements Authenticator

An authenticator that checks the username/password against an sql database. Will read the following parameters from the config file:

Author:
Robert Olofsson

Constructor Summary
SQLAuthenticator(SProperties props)
           
 
Method Summary
 boolean authenticate(String user, String token)
          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

SQLAuthenticator

public SQLAuthenticator(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 token)
Description copied from interface: Authenticator
Try to authenticate the user.

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