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_authn_anon.xml.meta">
25 <name>mod_authn_anon</name>
26 <description>Allows "anonymous" user access to authenticated
28 <status>Extension</status>
29 <sourcefile>mod_authn_anon.c</sourcefile>
30 <identifier>authn_anon_module</identifier>
33 <p>This module provides authentication front-ends such as
34 <module>mod_auth_basic</module> to authenticate users similar
35 to anonymous-ftp sites, <em>i.e.</em> have a 'magic' user id
36 'anonymous' and the email address as a password. These email
37 addresses can be logged.</p>
39 <p>Combined with other (database) access control methods, this
40 allows for effective user tracking and customization according
41 to a user profile while still keeping the site open for
42 'unregistered' users. One advantage of using Auth-based user
43 tracking is that, unlike magic-cookies and funny URL
44 pre/postfixes, it is completely browser independent and it
45 allows users to share URLs.</p>
47 <p>When using <module>mod_auth_basic</module>, this module is invoked
48 via the <directive module="mod_auth_basic">AuthBasicProvider</directive>
49 directive with the <code>anon</code> value.</p>
52 <section id="example"><title>Example</title>
53 <p>The example below is combined with "normal" htpasswd-file based
54 authentication and allows users in additionally as 'guests' with the
55 following properties:</p>
58 <li>It insists that the user enters a userID.
59 (<directive module="mod_authn_anon"
60 >Anonymous_NoUserID</directive>)</li>
62 <li>It insists that the user enters a password.
63 (<directive module="mod_authn_anon"
64 >Anonymous_MustGiveEmail</directive>)</li>
66 <li>The password entered must be a valid email address, <em>i.e.</em>
67 contain at least one '@' and a '.'.
68 (<directive module="mod_authn_anon"
69 >Anonymous_VerifyEmail</directive>)</li>
71 <li>The userID must be one of <code>anonymous guest www test
72 welcome</code> and comparison is <strong>not</strong> case
73 sensitive. (<directive module="mod_authn_anon"
74 >Anonymous</directive>)</li>
76 <li>And the Email addresses entered in the passwd field are
77 logged to the error log file.
78 (<directive module="mod_authn_anon"
79 >Anonymous_LogEmail</directive>)</li>
82 <example><title>Example</title>
83 <highlight language="config">
84 <Directory "/var/www/html/private">
85 AuthName "Use 'anonymous' & Email address for guest entry"
87 AuthBasicProvider file anon
88 AuthUserFile "/path/to/your/.htpasswd"
90 Anonymous_NoUserID off
91 Anonymous_MustGiveEmail on
92 Anonymous_VerifyEmail on
94 Anonymous anonymous guest www test welcome
103 <name>Anonymous</name>
104 <description>Specifies userIDs that are allowed access without
105 password verification</description>
106 <syntax>Anonymous <var>user</var> [<var>user</var>] ...</syntax>
107 <contextlist><context>directory</context><context>.htaccess</context>
109 <override>AuthConfig</override>
112 <p>A list of one or more 'magic' userIDs which are allowed
113 access without password verification. The userIDs are space
114 separated. It is possible to use the ' and " quotes to allow a
115 space in a userID as well as the \ escape character.</p>
117 <p>Please note that the comparison is
118 <strong>case-IN-sensitive</strong>.<br />
119 It's strongly recommended that the magic username
120 '<code>anonymous</code>' is always one of the allowed
123 <example><title>Example:</title>
124 <highlight language="config">
125 Anonymous anonymous "Not Registered" "I don't know"
129 <p>This would allow the user to enter without password
130 verification by using the userIDs "anonymous",
131 "AnonyMous", "Not Registered" and "I Don't Know".</p>
133 <p>As of Apache 2.1 it is possible to specify the userID as
134 "<code>*</code>". That allows <em>any</em> supplied userID to be
140 <name>Anonymous_LogEmail</name>
141 <description>Sets whether the password entered will be logged in the
142 error log</description>
143 <syntax>Anonymous_LogEmail On|Off</syntax>
144 <default>Anonymous_LogEmail On</default>
145 <contextlist><context>directory</context><context>.htaccess</context>
147 <override>AuthConfig</override>
150 <p>When set <code>On</code>, the default, the 'password' entered
151 (which hopefully contains a sensible email address) is logged in
157 <name>Anonymous_MustGiveEmail</name>
158 <description>Specifies whether blank passwords are allowed</description>
159 <syntax>Anonymous_MustGiveEmail On|Off</syntax>
160 <default>Anonymous_MustGiveEmail On</default>
161 <contextlist><context>directory</context><context>.htaccess</context>
163 <override>AuthConfig</override>
166 <p>Specifies whether the user must specify an email address as
167 the password. This prohibits blank passwords.</p>
172 <name>Anonymous_NoUserID</name>
173 <description>Sets whether the userID field may be empty</description>
174 <syntax>Anonymous_NoUserID On|Off</syntax>
175 <default>Anonymous_NoUserID Off</default>
176 <contextlist><context>directory</context><context>.htaccess</context>
178 <override>AuthConfig</override>
181 <p>When set <code>On</code>, users can leave the userID (and
182 perhaps the password field) empty. This can be very convenient for
183 MS-Explorer users who can just hit return or click directly on the
184 OK button; which seems a natural reaction.</p>
189 <name>Anonymous_VerifyEmail</name>
190 <description>Sets whether to check the password field for a correctly
191 formatted email address</description>
192 <syntax>Anonymous_VerifyEmail On|Off</syntax>
193 <default>Anonymous_VerifyEmail Off</default>
194 <contextlist><context>directory</context><context>.htaccess</context>
196 <override>AuthConfig</override>
199 <p>When set <code>On</code> the 'password' entered is checked for
200 at least one '@' and a '.' to encourage users to enter valid email
201 addresses (see the above <directive
202 module="mod_authn_anon">Anonymous_LogEmail</directive>).</p>