2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_auth_basic.xml.meta">
25 <name>mod_auth_basic</name>
26 <description>Basic authentication</description>
28 <sourcefile>mod_auth_basic.c</sourcefile>
29 <identifier>auth_basic_module</identifier>
30 <compatibility>Available in Apache 2.1 and later</compatibility>
33 <p>This module allows the use of HTTP Basic Authentication to
34 restrict access by looking up users in the given providers.
35 HTTP Digest Authentication is provided by
36 <module>mod_auth_digest</module>. This module should
37 usually be combined with at least one authentication module
38 such as <module>mod_authn_file</module> and one authorization
39 module such as <module>mod_authz_user</module>.</p>
41 <seealso><directive module="mod_authn_core">AuthName</directive></seealso>
42 <seealso><directive module="mod_authn_core">AuthType</directive></seealso>
43 <seealso><directive module="mod_authz_core">Require</directive></seealso>
44 <seealso><a href="../howto/auth.html">Authentication howto</a></seealso>
47 <name>AuthBasicProvider</name>
48 <description>Sets the authentication provider(s) for this location</description>
49 <syntax>AuthBasicProvider <var>provider-name</var>
50 [<var>provider-name</var>] ...</syntax>
51 <default>AuthBasicProvider file</default>
52 <contextlist><context>directory</context><context>.htaccess</context>
54 <override>AuthConfig</override>
57 <p>The <directive>AuthBasicProvider</directive> directive sets
58 which provider is used to authenticate the users for this location.
59 The default <code>file</code> provider is implemented
60 by the <module>mod_authn_file</module> module. Make sure
61 that the chosen provider module is present in the server.</p>
62 <example><title>Example</title>
63 <highlight language="config">
64 <Location /secure>
66 AuthName "private area"
69 AuthDBMUserFile /www/etc/dbmpasswd
74 <p> Providers are queried in order until a provider finds a match
75 for the requested username, at which point this sole provider will
76 attempt to check the password. A failure to verify the password does
77 not result in control being passed on to subsequent providers.</p>
79 <p>Providers are implemented by <module>mod_authn_dbm</module>,
80 <module>mod_authn_file</module>, <module>mod_authn_dbd</module>,
81 <module>mod_authnz_ldap</module> and <module>mod_authn_socache</module>.</p>
86 <name>AuthBasicAuthoritative</name>
87 <description>Sets whether authorization and authentication are passed to
88 lower level modules</description>
89 <syntax>AuthBasicAuthoritative On|Off</syntax>
90 <default>AuthBasicAuthoritative On</default>
91 <contextlist><context>directory</context><context>.htaccess</context>
93 <override>AuthConfig</override>
96 <p>Normally, each authorization module listed in <directive
97 module="mod_auth_basic">AuthBasicProvider</directive> will attempt
98 to verify the user, and if the user is not found in any provider,
99 access will be denied. Setting the
100 <directive>AuthBasicAuthoritative</directive> directive explicitly
101 to <code>Off</code> allows for both authentication and
102 authorization to be passed on to other non-provider-based modules
103 if there is <strong>no userID</strong> or <strong>rule</strong>
104 matching the supplied userID. This should only be necessary when
105 combining <module>mod_auth_basic</module> with third-party modules
106 that are not configured with the <directive
107 module="mod_auth_basic">AuthBasicProvider</directive>
108 directive. When using such modules, the order of processing
109 is determined in the modules' source code and is not configurable.</p>