SQLAuthenticator (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD