Summary
This module provides support for HTTP Basic Authentication, with user information stored in the SQLite datbase.
Building and Installing
First, make sure that you have SQLite header and library files installed in a common location. The Makefile.apx assumes they are in /usr/local/{include,lib}. If they are elsewhere, modify the Makefile.apxs accordingly.
To build as a DSO:
make -f Makefile.apxs
To install:
make -f Makefile.apxs install
Directives
AuthSQLiteDB
Specifies the location of the SQLite database. The database needs to be
readable by the user that Apache runs as. Default is empty.
AuthSQLiteUserTable
Specifies the table containing basic user information: username and
password. Default is "user_info".
AuthSQLiteGroupTable
Specifies the table contaning user-group information. Do not use it if
you don't want group authentication. Default is empty.
AuthSQLiteNameField
Specifies the field containing the usernames (in both user and group
tables). Default is "user_name".
AuthSQLitePasswordField
Specifies the field containing the password. Default is "user_password".
AuthSQLiteGroupField
Specifies the field containing the group. Do not use it if you don't
want group authentication. Default is empty.
AuthSQLiteCryptedPasswords
If On, then the passwords are assumed to be crypted with standard UNIX
crypt function. Default is On.
AuthSQLiteMD5Passwords
If On, then the passwords are assumed to be hashed using MD5 algorithm.
Takes priority over AuthSQLiteCryptedPasswords if both are turned on.
Default is Off.
AuthSQLiteNoPasswords
If On, then any password (even empty) will be accepted. Only username
will be used for authentication. Default is Off.
AuthSQLiteAuthoritative
If On, then the other auth modules do not get to authenticate the user
if this one fails. Default is On.
Usage
There is a sample schema in the schema.txt file to get you started. An example of protecting a directory with mod_auth_sqlite in httpd.conf:
AuthName My Realm
AuthType Basic
AuthSQLiteDB /export/db/sqlite_db
AuthSQLiteGroupTable user_groups
AuthSQLiteGroupField user_group
AuthSQLiteMD5Passwords On
Require group staff
License
See Apache license.
Credits
Andrei Zmievski <andrei@php.net>
