Bug 972 - [Chameleon - Core] add capability to authenticate users
: [Chameleon - Core] add capability to authenticate users
Status: RESOLVED FIXED
: Chameleon
Core
: 2.2
: PC All
: P1 enhancement
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-02-21 19:56 by
Modified: 2005-05-25 10:57 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-02-21 19:56:50
The desired addition is to add at least a basic level of authentication
capability to Chameleon.  The specific requirement is to support sqlite
databases for authentication, but the architecture needs to support multiple
methods of authentication.

Chameleon core class will be modified to include a new member variable,
moAuthenticator.  This variable is null by default and this indicates no
authentication is performed.  To have Chameleon perform default (built in)
authentication, this member variable is assigned an object which implements two
methods:

isAuthenticated(): returns true or false if the current connection is authenticated

authenticate($user,$password): authenticates a user

A basic authentication class is provided in Authenticator.php.  This takes a
pointer to an abstract database class constructed from one of the adb-supported
databases ... currently only sqlite.  Notes on adb further on ...

The Authenticator is somewhat flexible and can be connected to any backend adb
database with configurable table and fields.  It runs an SQL query against the
database for the current user and md5() of the password looking for a match.

To implement custom authentication, you can override the CWCAuthenticate()
method in your Chameleon application class.  This method is responsible for
providing authentication and can be set up to do anything you wish.  The default
implementation looks for an Authenticator object and uses it if found.

CWCAuthenticate is called as the first step of CWCExecute.

A new module, adb, will be added to php_utils to provide a light-weight database
wrapper with minimal functionality.  It is similar to ADODB, lighter weight but
far less capable.  It would be possible to hook up an ADODB authenticator.
------- Comment #1 From 2005-05-25 10:57:01 -------
done, forgot to mark fixed