rabbit.filter.authenticate
Class SQLAuthenticator
java.lang.Object
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:
- driver
- url
- user
- password
- select - the sql query to run
- cachetime (minutes)
- one_ip_only - restrict access so that users can only use one ip
- Author:
- Robert Olofsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLAuthenticator
public SQLAuthenticator(SProperties props)
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 usernametoken
- the password of the user
- Returns:
- true if authentication succeeded, false otherwise.