mod_auth_basic
Basic authentication
Base
mod_auth_basic.c
auth_basic_module
Available in Apache 2.1 and later

This module allows the use of HTTP Basic Authentication to restrict access by looking up users in the given providers. HTTP Digest Authentication is provided by mod_auth_digest.

AuthName
AuthType
AuthBasicProvider
Sets the authentication provider(s) for this location
AuthBasicProvider On|Off|provider-name [provider-name] ...
AuthBasicProvider On
directory
.htaccess
AuthConfig

The AuthBasicProvider directive sets which provider is used to authenticate the users for this location. Setting the value to `On` will choose the default provider (`file`). Since the `file` provider is implemented by the mod_authn_file module, you have to make sure, that the module is present in the server.

# Example

<Location /secure>
AuthBasicProvider dbm
AuthDBMType SDBM
AuthDBMUserFile /www/etc/dbmpasswd
Require valid-user
</Location>

See mod_authn_dbm and mod_authn_file for providers.

The value `Off` clears the provider list and sets it back to the default.

AuthBasicAuthoritative
Sets whether authorization and authentication are passed to lower level modules
AuthBasicAuthoritative On|Off
AuthBasicAuthoritative On
directory
.htaccess
AuthConfig

Setting the AuthBasicAuthoritative directive explicitly to `Off` allows for both authentication and authorization to be passed on to lower level modules (as defined in the `modules.c` files) if there is no userID or rule matching the supplied userID. If there is a userID and/or rule specified, the usual password and access checks will be applied and a failure will give an "Authentication Required" reply.

So if a userID appears in the database of more than one module; or if a valid Require directive applies to more than one module; then the first module will verify the credentials; and no access is passed on; regardless of the AuthBasicAuthoritative setting.

By default control is not passed on and an unknown userID or rule will result in an "Authentication Required" reply. Not setting it thus keeps the system secure and forces an NCSA compliant behaviour.