At 08:37 PM 1/15/2001 -0800, you wrote:
>On Mon, 15 Jan 2001, Edmund Mergl wrote:
>
>> any comments ?
>
>[count number of times a user has logged in and such things]
>
Hope I am not out of place here, and also that the ideas are generic enough
to be applied to a wide number of authentication requirements.

Here are two ideas.
I.=================================================
The first idea for authentication: 
Provide a directive to perform a comparison on any or all fields of the
current user's record.  If the comparison is true, provide a URL to
REDIRECT the original request.

The supporting directives could be something like:
Auth_DBI_comp  {regexp}
Auth_DBI_url        "http://www.redirect.com/ok/"

Where regexp is a comparison string and url is where to REDIRECT the user
if the comparison is true.

The original request URL should be passed as a url ? argument, so that a
REDIRECT cgi target script could determine the original requested url.  The
target script could update any fields as required.

The regexp needs to be able to easily access any arbitrary field values for
the current user's record. Perhaps simply by pre appending a '$' to the
field name.  For example:

Auth_DBI_comp {$username='xyz' && $usecount<4}

This would REDIRECT every login with field "usercount" less than 4 for
field "username" equal 'xyz'.

A pass and fail condition would also be needed, perhaps just designated as
PASS and FAIL.

Being able to specify multiple conditions per authorization attempt would
be useful.

II.================================================
A second idea (for authorization) is to provide a generic way to set an
Apache environment variable with the contents of any field for the current
user.  For example:

Auth_DBI_env  field1,field2

This would set two environment variables called: "FIELD1" and "FIELD2" with
their field data content of the current user's record.

I suppose if the data base had multiple records for a user, then the
environment variables would contain a list of values.
====================================================



Reply via email to