mod_auth_form.html.en revision 08cf4a15275e4cb65a424b3a1db5410bfb51085c
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<?xml version="1.0" encoding="ISO-8859-1"?>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
33bdcae1f7a1a65e351dda2a766a0cf28b1e695dnd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb This file is generated from xml source: DO NOT EDIT
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb -->
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<title>mod_auth_form - Apache HTTP Server</title>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<link href="/images/favicon.ico" rel="shortcut icon" /></head>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<body>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div id="page-header">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<p class="apache">Apache HTTP Server Version 2.3</p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<img alt="" src="/images/feather.gif" /></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div id="path">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div id="page-content">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div id="preamble"><h1>Apache Module mod_auth_form</h1>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div class="toplang">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<p><span>Available Languages: </span><a href="/en/mod/mod_auth_form.html" title="English">&nbsp;en&nbsp;</a></p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Form authentication</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>auth_form_module</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_auth_form.c</td></tr></table>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<h3>Summary</h3>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <div class="warning"><h3>Warning</h3>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <p>Form authentication depends on the <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb modules, and these modules make use of HTTP cookies, and as such can fall
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb victim to Cross Site Scripting attacks, or expose potentially private
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb information to clients. Please ensure that the relevant risks have
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb been taken into account before enabling the session functionality on
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb your server.</p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb </div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <p>This module allows the use of an HTML login form to restrict access
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb by looking up users in the given providers. HTML forms require
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb significantly more configuration than the alternatives, however an
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb HTML login form can provide a much friendlier experience for end users.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb </p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <p>HTTP basic authentication is provided by
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <code class="module"><a href="/mod/mod_auth_basic.html">mod_auth_basic</a></code>, and HTTP digest authentication is
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb provided by <code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code>. This module should
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb be combined with at least one authentication module
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb such as <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code> and one authorization
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb module such as <code class="module"><a href="/mod/mod_authz_user.html">mod_authz_user</a></code>.</p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <p>Once the user has been successfully authenticated, the user's login
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb details will be stored in a session provided by <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb </p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div id="quickview"><h3 class="directives">Directives</h3>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<ul id="toc">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformauthoritative">AuthFormAuthoritative</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformbody">AuthFormBody</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformdisablenostore">AuthFormDisableNoStore</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformfakebasicauth">AuthFormFakeBasicAuth</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformlocation">AuthFormLocation</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformlogoutlocation">AuthFormLogoutLocation</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformmethod">AuthFormMethod</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformmimetype">AuthFormMimetype</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformpassword">AuthFormPassword</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformprovider">AuthFormProvider</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformsitepassphrase">AuthFormSitePassphrase</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformsize">AuthFormSize</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#authformusername">AuthFormUsername</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</ul>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<h3>Topics</h3>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<ul id="topics">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#basicconfig">Basic Configuration</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#standalone">Standalone Login</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#inline">Inline Login</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#inlinepreservebody">Inline Login with Body Preservation</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><img alt="" src="/images/down.gif" /> <a href="#loggingout">Logging Out</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</ul><h3>See also</h3>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<ul class="seealso">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><code class="module"><a href="/mod/mod_session.html">mod_session</a></code></li>
f888346b48f5e5b5e3f0a47dedb8cefd2759a4e2gregames<li><code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><code class="directive"><a href="/mod/mod_authz_core.html#match">Match</a></code></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<li><a href="/howto/auth.html">Authentication howto</a></li>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</ul></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<div class="section">
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<h2><a name="basicconfig" id="basicconfig">Basic Configuration</a></h2>
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz <p>To protect a particular URL with <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code>, you need to
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz decide where you will store your <var>session</var>, and you will need to
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz decide what method you will use to authenticate. In this simple example, the
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz login details will be stored in a session based on
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz <code class="module"><a href="/mod/mod_session_cookie.html">mod_session_cookie</a></code>, and authentication will be attempted against
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz a file using <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code>. If authentication is unsuccessful,
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz the user will be redirected to the form login page.</p>
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <div class="example"><h3>Basic example</h3><p><code>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb AuthFormProvider file<br />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb AuthUserFile conf/passwd<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker AuthType form<br />
a2a0abd88b19e042a3eb2a9fa1702c25ad51303dwrowe AuthName realm<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker AuthFormLoginRequiredLocation http://example.com/login.html<br />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb Session On<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker SessionCookieName session path=/<br />
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb SessionCryptoPassphrase secret<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker </code></p></div>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <p>The directive <code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code> will enable
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb the <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> authentication when set to the value <var>form</var>.
4f9c22c4f27571d54197be9674e1fc0d528192aestriker The directives <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code> and
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <code class="directive"><a href="/mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code> specify that usernames
4f9c22c4f27571d54197be9674e1fc0d528192aestriker and passwords should be checked against the chosen file.</p>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <p>The directives <code class="directive"><a href="/mod/mod_session.html#session">Session</a></code>,
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <code class="directive"><a href="/mod/mod_session_cookie.html#sessioncookiename">SessionCookieName</a></code> and
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <code class="directive"><a href="/mod/mod_session_crypto.html#sessioncryptopassphrase">SessionCryptoPassphrase</a></code> create an
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe encrypted session stored within an HTTP cookie on the browser. For more information
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe on the different options for configuring a session, read the documentation for
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <code class="module"><a href="/mod/mod_session.html">mod_session</a></code>.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
2d399cd7535887fceaa9f8f116eb98ce68ddd602trawick <p>In the simple example above, a URL has been protected by
c2cf53a40a9814eb91db2cdf820f97d943f21628coar <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code>, but the user has yet to be given an opportunity to
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe enter their username and password. Options for doing so include providing a
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe dedicated standalone login page for this purpose, or for providing the login
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar page inline.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<div class="section">
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe<h2><a name="standalone" id="standalone">Standalone Login</a></h2>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <p>The login form can be hosted as a standalone page, or can be provided inline on
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe the same page.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <p>When configuring the login as a standalone page, unsuccessful authentication
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe attempts should be redirected to a login form created by the website for this purpose,
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe using the <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe directive. Typically this login page will contain an HTML form, asking the user to
3e392a5afd51526de3cb15d57ee46d8cb160ae65gregames provide their usename and password.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <div class="example"><h3>Example login form</h3><p><code>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;form method="POST" action="/dologin.html"&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe Username: &lt;input type="text" name="httpd_username" value="" /&gt;<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar Password: &lt;input type="password" name="httpd_password" value="" /&gt;<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar &lt;input type="submit" name="login" value="Login" /&gt;<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar &lt;/form&gt;<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar </code></p></div>
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar <p>The part that does the actual login is handled by the <var>form-login-handler</var>.
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar The action of the form should point at this handler, which is configured within
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar Apache as follows:</p>
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz
2a6e98ba4ffa30ded5d8831664c5cb2a170a56b6coar <div class="example"><h3>Form login handler example</h3><p><code>
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar &lt;Location /dologin.html&gt;
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar <span class="indent">
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar SetHandler form-login-handler<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar AuthFormLoginRequiredLocation http://example.com/login.html<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar AuthFormLoginSuccessLocation http://example.com/success.html<br />
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar AuthFormProvider file<br />
2a6e98ba4ffa30ded5d8831664c5cb2a170a56b6coar AuthUserFile conf/passwd<br />
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz AuthType form<br />
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz AuthName realm<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe Session On<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe SessionCookieName session path=/<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe SessionCryptoPassphrase secret<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </span>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker &lt;/Location&gt;
4f9c22c4f27571d54197be9674e1fc0d528192aestriker </code></p></div>
3e392a5afd51526de3cb15d57ee46d8cb160ae65gregames
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>The URLs specified by the
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive will typically
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe point to a page explaining to the user that their login attempt was unsuccessful, and they
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe should try again. The <code class="directive"><a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></code>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe directive specifies the URL the user should be redirected to upon successful login.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>Alternatively, the URL to redirect the user to on success can be embedded within the login
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe form, as in the example below. As a result, the same <var>form-login-handler</var> can be
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe reused for different areas of a website.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <div class="example"><h3>Example login form with location</h3><p><code>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker &lt;form method="POST" action="/dologin.html"&gt;<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <span class="indent">
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe Username: &lt;input type="text" name="httpd_username" value="" /&gt;<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe Password: &lt;input type="password" name="httpd_password" value="" /&gt;<br />
c2cf53a40a9814eb91db2cdf820f97d943f21628coar &lt;input type="submit" name="login" value="Login" /&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;input type="hidden" name="httpd_location" value="http://example.com/success.html" /&gt;<br />
4775dfc34c90fada8c7c4d6a57ed8a3114d55c2dtrawick </span>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;/form&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </code></p></div>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<div class="section">
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe<h2><a name="inline" id="inline">Inline Login</a></h2>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <div class="warning"><h3>Warning</h3>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>A risk exists that under certain circumstances, the login form configured
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe using inline login may be submitted more than once, revealing login credentials to
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe the application running underneath. The administrator must ensure that the underlying
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe application is properly secured to prevent abuse. If in doubt, use the
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe standalone login configuration.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </div>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <p>As an alternative to having a dedicated login page for a website, it is possible to
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe configure <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> to authenticate users inline, without being
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe redirected to another page. This allows the state of the current page to be preserved
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe during the login attempt. This can be useful in a situation where a time limited
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe session is in force, and the session times out in the middle of the user request. The
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe user can be re-authenticated in place, and they can continue where they left off.</p>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>If a non-authenticated user attempts to access a page protected by
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> that isn't configured with a
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive,
4f9c22c4f27571d54197be9674e1fc0d528192aestriker a <var>HTTP_UNAUTHORIZED</var> status code is returned to the browser indicating to the user
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe that they are not authorized to view the page.</p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>To configure inline authentication, the administrator overrides the error document
4f9c22c4f27571d54197be9674e1fc0d528192aestriker returned by the <var>HTTP_UNAUTHORIZED</var> status code with a custom error document
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe containing the login form, as follows:</p>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar <div class="example"><h3>Basic inline example</h3><p><code>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe AuthFormProvider file<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <strong>ErrorDocument 401 /login.shtml</strong><br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe AuthUserFile conf/passwd<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe AuthType form<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe AuthName realm<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe AuthFormLoginRequiredLocation http://example.com/login.html<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker Session On<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe SessionCookieName session path=/<br />
c2cf53a40a9814eb91db2cdf820f97d943f21628coar SessionCryptoPassphrase secret<br />
c2cf53a40a9814eb91db2cdf820f97d943f21628coar </code></p></div>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz <p>The error document page should contain a login form with an empty action property,
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz as per the example below. This has the effect of submitting the form to
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz the original protected URL, without the page having to know what that
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe URL is.</p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
c2cf53a40a9814eb91db2cdf820f97d943f21628coar <div class="example"><h3>Example inline login form</h3><p><code>
c2cf53a40a9814eb91db2cdf820f97d943f21628coar &lt;form method="POST" <strong>action=""</strong>&gt;<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <span class="indent">
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz Username: &lt;input type="text" name="httpd_username" value="" /&gt;<br />
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz Password: &lt;input type="password" name="httpd_password" value="" /&gt;<br />
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz &lt;input type="submit" name="login" value="Login" /&gt;<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe </span>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;/form&gt;<br />
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe </code></p></div>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <p>When the end user has filled in their login details, the form will make
08ab23ee4e41ac8587da5a3bb8d4e9c49523b0b8nd an HTTP POST request to the original password protected URL.
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> will intercept this POST request, and if
08ab23ee4e41ac8587da5a3bb8d4e9c49523b0b8nd HTML fields are found present for the username and password, the user
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe will be logged in, and the original password protected URL will be returned
4f9c22c4f27571d54197be9674e1fc0d528192aestriker to the user as a GET request.</p>
c2cf53a40a9814eb91db2cdf820f97d943f21628coar
c2cf53a40a9814eb91db2cdf820f97d943f21628coar </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe<div class="section">
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz<h2><a name="inlinepreservebody" id="inlinepreservebody">Inline Login with Body Preservation</a></h2>
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz <p>A limitation of the inline login technique described above is that should an
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe HTML form POST have resulted in the request to authenticate or
4f9c22c4f27571d54197be9674e1fc0d528192aestriker reauthenticate, the
c2cf53a40a9814eb91db2cdf820f97d943f21628coar contents of the original form posted by the browser will be lost. Depending on
c2cf53a40a9814eb91db2cdf820f97d943f21628coar the function of the website, this could present significant inconvenience for the
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe end user.</p>
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz <p><code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> addresses this by allowing the method and body
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz of the original request to be embedded in the login form. If authentication
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe is successful, the original method and body will be retried by Apache, preserving
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe the state of the original request.</p>
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <p>To enable body preservation, add three additional fields to the login form as
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe per the example below.</p>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <div class="example"><h3>Example with body preservation</h3><p><code>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;form method="POST" action=""&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <span class="indent">
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe Username: &lt;input type="text" name="httpd_username" value="" /&gt;<br />
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz Password: &lt;input type="password" name="httpd_password" value="" /&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;input type="submit" name="login" value="Login" /&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <strong>&lt;input type="hidden" name="httpd_method" value="POST" /&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /&gt;<br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;input type="hidden" name="httpd_body" value="name1=value1&amp;name2=value2" /&gt;</strong><br />
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </span>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe &lt;/form&gt;
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe </code></p></div>
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe <p>How the method, mimetype and body of the original request are embedded within the
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe login form will depend on the platform and technology being used within the website.
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe </p>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <p>One option is to use the <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> module along with the
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <code class="directive"><a href="/mod/core.html#keptbodysize">KeptBodySize</a></code> directive, along with a suitable
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe CGI script to embed the variables in the form.</p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <p>Another option is to render the login form using a CGI script or other dynamic
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe technology.</p>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <div class="example"><h3>CGI example</h3><p><code>
0540a0b469147b52e858587270dba31c2aaa9e09wrowe AuthFormProvider file<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <strong>ErrorDocument 401 /cgi-bin/login.cgi</strong><br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe ...<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe </code></p></div>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<div class="section">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<h2><a name="loggingout" id="loggingout">Logging Out</a></h2>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <p>To enable a user to log out of a particular session, configure a page to
4f9c22c4f27571d54197be9674e1fc0d528192aestriker be handled by the <var>form-logout-handler</var>. Any attempt to access this
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe URL will cause the username and password to be removed from the current
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe session, effectively logging the user out.</p>
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <p>By setting the
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <code class="directive"><a href="#authformlogoutlocation">AuthFormLogoutLocation</a></code> directive,
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp a URL can be specified that the browser will be redirected to on successful
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe logout. This URL might explain to the user that they have been logged out, and
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe give the user the option to log in again.</p>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe <div class="example"><h3>Basic logout example</h3><p><code>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe SetHandler form-logout-handler<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe AuthName realm<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe AuthFormLogoutLocation http://example.com/loggedout.html<br />
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp Session On<br />
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp SessionCookieName session path=/<br />
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp SessionCryptoPassphrase secret<br />
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp </code></p></div>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp <p>Note that logging a user out does not delete the session; it merely removes
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp the username and password from the session. If this results in an empty session,
4f9c22c4f27571d54197be9674e1fc0d528192aestriker the net effect will be the removal of that session, but this is not
4f9c22c4f27571d54197be9674e1fc0d528192aestriker guaranteed. If you want to guarantee the removal of a session, set the
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <code class="directive"><a href="/mod/mod_session.html#sessionmaxage">SessionMaxAge</a></code> directive to a small
4f9c22c4f27571d54197be9674e1fc0d528192aestriker value, like 1 (setting the directive to zero would mean no session age limit).
4f9c22c4f27571d54197be9674e1fc0d528192aestriker </p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <div class="example"><h3>Basic session expiry example</h3><p><code>
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp SetHandler form-logout-handler<br />
7a2edaa0193cbb0d79a65a8461a609a9402aea49brianp AuthFormLogoutLocation http://example.com/loggedout.html<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe Session On<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe SessionMaxAge 1<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe SessionCookieName session path=/<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe SessionCryptoPassphrase secret<br />
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe </code></p></div>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker </div>
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe<div class="directive-section"><h2><a name="AuthFormAuthoritative" id="AuthFormAuthoritative">AuthFormAuthoritative</a> <a name="authformauthoritative" id="authformauthoritative">Directive</a></h2>
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe<table class="directive">
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets whether authorization and authentication are passed to
cc9582e53aead2a044077c4a92f3dfc3605590b3wrowelower level modules</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormAuthoritative On|Off</code></td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormAuthoritative On</code></td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb</table>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <p>Normally, each authorization module listed in <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code> will attempt
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb to verify the user, and if the user is not found in any provider,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb access will be denied. Setting the
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb <code class="directive">AuthFormAuthoritative</code> directive explicitly
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb to <code>Off</code> allows for both authentication and
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb authorization to be passed on to other non-provider-based modules
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb if there is <strong>no userID</strong> or <strong>rule</strong>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb matching the supplied userID. This should only be necessary when
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb combining <code class="module"><a href="/mod/mod_auth_form.html">mod_auth_form</a></code> with third-party modules
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe that are not configured with the <code class="directive"><a href="#authformprovider">AuthFormProvider</a></code>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe directive. When using such modules, the order of processing
4f9c22c4f27571d54197be9674e1fc0d528192aestriker is determined in the modules' source code and is not configurable.</p>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe</div>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<div class="directive-section"><h2><a name="AuthFormBody" id="AuthFormBody">AuthFormBody</a> <a name="authformbody" id="authformbody">Directive</a></h2>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<table class="directive">
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the body of the request to attempt on successful login</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormBody <var>fieldname</var></code></td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_body</code></td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe</table>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe the name of an HTML field which, if present, will contain the method of the request to
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz to submit should login be successful.</p>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar <p>By populating the form with fields described by
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz a request that may have been interrupted by the login screen, or by a session
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz timeout.</p>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe</div>
659ad814f714e556bdd03e1d771cba156baab92ewrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
659ad814f714e556bdd03e1d771cba156baab92ewrowe<div class="directive-section"><h2><a name="AuthFormDisableNoStore" id="AuthFormDisableNoStore">AuthFormDisableNoStore</a> <a name="authformdisablenostore" id="authformdisablenostore">Directive</a></h2>
659ad814f714e556bdd03e1d771cba156baab92ewrowe<table class="directive">
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Disable the CacheControl no-store header on the login page</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormDisableNoStore <var>On|Off</var></code></td></tr>
11fb2f3611e6ff9a541e10b13e3108934f828141gregames<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormDisableNoStore Off</code></td></tr>
11fb2f3611e6ff9a541e10b13e3108934f828141gregames<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
11fb2f3611e6ff9a541e10b13e3108934f828141gregames<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz</table>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz <p>The <code class="directive"><a href="#authformdisablenostore">AuthFormDisableNoStore</a></code> flag
4f9c22c4f27571d54197be9674e1fc0d528192aestriker disables the sending of a <code>Cache-Control no-store</code> header with the
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe error 401 page returned when the user is not yet logged in. The purpose of the header
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe is to make it difficult for an ecmascript application to attempt to resubmit the
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe login form, and reveal the username and password to the backend application. Disable
4f9c22c4f27571d54197be9674e1fc0d528192aestriker at your own risk.</p>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe</div>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2f1949bb0e3c209db94c8d521cba7380b9d11421trawick<div class="directive-section"><h2><a name="AuthFormFakeBasicAuth" id="AuthFormFakeBasicAuth">AuthFormFakeBasicAuth</a> <a name="authformfakebasicauth" id="authformfakebasicauth">Directive</a></h2>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<table class="directive">
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fake a Basic Authentication header</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormFakeBasicAuth <var>On|Off</var></code></td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormFakeBasicAuth Off</code></td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar</table>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe <p>The <code class="directive"><a href="#authformfakebasicauth">AuthFormFakeBasicAuth</a></code> flag
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar determines whether a <code>Basic Authentication</code> header will be added to
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe the request headers. This can be used to expose the username and password to
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar an underlying application, without the underlying application having to be aware
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe of how the login was achieved.</p>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz</div>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz<div class="directive-section"><h2><a name="AuthFormLocation" id="AuthFormLocation">AuthFormLocation</a> <a name="authformlocation" id="authformlocation">Directive</a></h2>
7c301a1818939f85da8f3629cc3e9b5588610ef0jerenkrantz<table class="directive">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying a URL to redirect to on successful login</td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLocation <var>fieldname</var></code></td></tr>
290ecc1ddceca1ed49bc1a5338921264b5c3e07cwrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_location</code></td></tr>
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe</table>
700b96db75e7cfadb5219978c1735b710d583763wrowe <p>The <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive specifies
700b96db75e7cfadb5219978c1735b710d583763wrowe the name of an HTML field which, if present, will contain a URL to redirect the browser to
700b96db75e7cfadb5219978c1735b710d583763wrowe should login be successful.</p>
700b96db75e7cfadb5219978c1735b710d583763wrowe
700b96db75e7cfadb5219978c1735b710d583763wrowe</div>
700b96db75e7cfadb5219978c1735b710d583763wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
700b96db75e7cfadb5219978c1735b710d583763wrowe<div class="directive-section"><h2><a name="AuthFormLoginRequiredLocation" id="AuthFormLoginRequiredLocation">AuthFormLoginRequiredLocation</a> <a name="authformloginrequiredlocation" id="authformloginrequiredlocation">Directive</a></h2>
700b96db75e7cfadb5219978c1735b710d583763wrowe<table class="directive">
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL of the page to be redirected to should login be required</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLoginRequiredLocation <var>url</var></code></td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
6964758306167dd898baedd21048bd1515dd9d30trawick</table>
700b96db75e7cfadb5219978c1735b710d583763wrowe <p>The <code class="directive"><a href="#authformloginrequiredlocation">AuthFormLoginRequiredLocation</a></code> directive
700b96db75e7cfadb5219978c1735b710d583763wrowe specifies the URL to redirect to should the user not be authorised to view a page. By default,
700b96db75e7cfadb5219978c1735b710d583763wrowe if a user is not authorised to view a page, the HTTP response code <code>HTTP_UNAUTHORIZED</code>
700b96db75e7cfadb5219978c1735b710d583763wrowe will be returned with the page specified by the
700b96db75e7cfadb5219978c1735b710d583763wrowe <code class="directive"><a href="/mod/mod_core.html#errordocument">ErrorDocument</a></code> directive. This directive overrides this
700b96db75e7cfadb5219978c1735b710d583763wrowe default.</p>
700b96db75e7cfadb5219978c1735b710d583763wrowe
700b96db75e7cfadb5219978c1735b710d583763wrowe <p>Use this directive if you have a dedicated login page to redirect users to.</p>
700b96db75e7cfadb5219978c1735b710d583763wrowe
700b96db75e7cfadb5219978c1735b710d583763wrowe
700b96db75e7cfadb5219978c1735b710d583763wrowe</div>
700b96db75e7cfadb5219978c1735b710d583763wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
700b96db75e7cfadb5219978c1735b710d583763wrowe<div class="directive-section"><h2><a name="AuthFormLoginSuccessLocation" id="AuthFormLoginSuccessLocation">AuthFormLoginSuccessLocation</a> <a name="authformloginsuccesslocation" id="authformloginsuccesslocation">Directive</a></h2>
700b96db75e7cfadb5219978c1735b710d583763wrowe<table class="directive">
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL of the page to be redirected to should login be successful</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLoginSuccessLocation <var>url</var></code></td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
700b96db75e7cfadb5219978c1735b710d583763wrowe</table>
700b96db75e7cfadb5219978c1735b710d583763wrowe <p>The <code class="directive"><a href="#authformloginsuccesslocation">AuthFormLoginSuccessLocation</a></code> directive
700b96db75e7cfadb5219978c1735b710d583763wrowe specifies the URL to redirect to should the user have logged in successfully. This directive
700b96db75e7cfadb5219978c1735b710d583763wrowe can be overridden if a form field has been defined containing another URL using the
700b96db75e7cfadb5219978c1735b710d583763wrowe <code class="directive"><a href="#authformlocation">AuthFormLocation</a></code> directive.</p>
8aefbd756763807188d2e3ce336a8680e4893066wrowe
8aefbd756763807188d2e3ce336a8680e4893066wrowe <p>Use this directive if you have a dedicated login URL, and you have not embedded the
8aefbd756763807188d2e3ce336a8680e4893066wrowe destination page in the login form.</p>
8aefbd756763807188d2e3ce336a8680e4893066wrowe
8aefbd756763807188d2e3ce336a8680e4893066wrowe
8aefbd756763807188d2e3ce336a8680e4893066wrowe</div>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<div class="directive-section"><h2><a name="AuthFormLogoutLocation" id="AuthFormLogoutLocation">AuthFormLogoutLocation</a> <a name="authformlogoutlocation" id="authformlogoutlocation">Directive</a></h2>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<table class="directive">
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The URL to redirect to after a user has logged out</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormLogoutLocation <var>uri</var></code></td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
a2a0abd88b19e042a3eb2a9fa1702c25ad51303dwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe</table>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>The <code class="directive"><a href="#authformlogoutlocation">AuthFormLogoutLocation</a></code> directive
8aefbd756763807188d2e3ce336a8680e4893066wrowe specifies the URL of a page on the server to redirect to should the user attempt to log out.</p>
8aefbd756763807188d2e3ce336a8680e4893066wrowe
2fa5b5878e7567e2875807c3e2a2b3b0d3ef74bewrowe <p>When a URI is accessed that is served by the handler <code>form-logout-handler</code>,
2fa5b5878e7567e2875807c3e2a2b3b0d3ef74bewrowe the page specified by this directive will be shown to the end user. For example:</p>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <div class="example"><h3>Example</h3><p><code>
8aefbd756763807188d2e3ce336a8680e4893066wrowe &lt;Location /logout&gt;<br />
8aefbd756763807188d2e3ce336a8680e4893066wrowe <span class="indent">
dc8692c6c0ca616a09aa12dad005f2ef23baa1a0wrowe SetHandler form-logout-handler<br />
a8d11d78181478da6a672f7fbc58b8d523351f49wrowe AuthFormLogoutLocation http://example.com/loggedout.html<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker Session on<br />
23c6309e36a63b13b61c35999c978017521993d6wrowe ...
23c6309e36a63b13b61c35999c978017521993d6wrowe </span>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker &lt;/Location&gt;
23c6309e36a63b13b61c35999c978017521993d6wrowe </code></p></div>
8aefbd756763807188d2e3ce336a8680e4893066wrowe
23c6309e36a63b13b61c35999c978017521993d6wrowe <p>An attempt to access the URI <var>/logout/</var> will result in the user being logged
2d399cd7535887fceaa9f8f116eb98ce68ddd602trawick out, and the page <var>/loggedout.html</var> will be displayed. Make sure that the page
4f9c22c4f27571d54197be9674e1fc0d528192aestriker <var>loggedout.html</var> is not password protected, otherwise the page will not be
23c6309e36a63b13b61c35999c978017521993d6wrowe displayed.</p>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe
8aefbd756763807188d2e3ce336a8680e4893066wrowe
8aefbd756763807188d2e3ce336a8680e4893066wrowe</div>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<div class="directive-section"><h2><a name="AuthFormMethod" id="AuthFormMethod">AuthFormMethod</a> <a name="authformmethod" id="authformmethod">Directive</a></h2>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<table class="directive">
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the method of the request to attempt on successful login</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormMethod <var>fieldname</var></code></td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_method</code></td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
2d399cd7535887fceaa9f8f116eb98ce68ddd602trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
a8d11d78181478da6a672f7fbc58b8d523351f49wrowe</table>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
8aefbd756763807188d2e3ce336a8680e4893066wrowe the name of an HTML field which, if present, will contain the method of the request to
8aefbd756763807188d2e3ce336a8680e4893066wrowe to submit should login be successful.</p>
cf6ef072483172309861d06e85b1aeff4573c060wrowe
cf6ef072483172309861d06e85b1aeff4573c060wrowe <p>By populating the form with fields described by
cf6ef072483172309861d06e85b1aeff4573c060wrowe <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
8aefbd756763807188d2e3ce336a8680e4893066wrowe <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
cf6ef072483172309861d06e85b1aeff4573c060wrowe <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
cf6ef072483172309861d06e85b1aeff4573c060wrowe a request that may have been interrupted by the login screen, or by a session
a2b181763cb35fd899feb4a436aeadaa80bf91eabrianp timeout.</p>
cf6ef072483172309861d06e85b1aeff4573c060wrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker</div>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<div class="directive-section"><h2><a name="AuthFormMimetype" id="AuthFormMimetype">AuthFormMimetype</a> <a name="authformmimetype" id="authformmimetype">Directive</a></h2>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<table class="directive">
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the mimetype of the body of the request to attempt on successful login</td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormMimetype <var>fieldname</var></code></td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_mimetype</code></td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
69adb3d949e3dd17c0492a01fc2cf298832c7eefwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
ecde48c75338ff5712f2036711f813c6dedca28ewrowe</table>
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick <p>The <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code> directive specifies
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick the name of an HTML field which, if present, will contain the
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick mimetype of the request to to submit should login be successful.</p>
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick <p>By populating the form with fields described by
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, a website can retry
ecde48c75338ff5712f2036711f813c6dedca28ewrowe a request that may have been interrupted by the login screen, or by a session
ecde48c75338ff5712f2036711f813c6dedca28ewrowe timeout.</p>
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick
ecde48c75338ff5712f2036711f813c6dedca28ewrowe</div>
ecde48c75338ff5712f2036711f813c6dedca28ewrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
ecde48c75338ff5712f2036711f813c6dedca28ewrowe<div class="directive-section"><h2><a name="AuthFormPassword" id="AuthFormPassword">AuthFormPassword</a> <a name="authformpassword" id="authformpassword">Directive</a></h2>
ecde48c75338ff5712f2036711f813c6dedca28ewrowe<table class="directive">
ecde48c75338ff5712f2036711f813c6dedca28ewrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the login password</td></tr>
d75626f0952c6152a99acd013a4f127d46f0f9edtrawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormPassword <var>fieldname</var></code></td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_password</code></td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar</table>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>The <code class="directive"><a href="#authformpassword">AuthFormPassword</a></code> directive specifies
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar the name of an HTML field which, if present, will contain the password to be used to log
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe in.</p>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker</div>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<div class="directive-section"><h2><a name="AuthFormProvider" id="AuthFormProvider">AuthFormProvider</a> <a name="authformprovider" id="authformprovider">Directive</a></h2>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<table class="directive">
23c6309e36a63b13b61c35999c978017521993d6wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the authentication provider(s) for this location</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormProvider <var>provider-name</var>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker[<var>provider-name</var>] ...</code></td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthFormProvider file</code></td></tr>
c2cf53a40a9814eb91db2cdf820f97d943f21628coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe</table>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>The <code class="directive">AuthFormProvider</code> directive sets
a9a4544168a37b43bd180b3703ccee995f27a80awrowe which provider is used to authenticate the users for this location.
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe The default <code>file</code> provider is implemented
a9a4544168a37b43bd180b3703ccee995f27a80awrowe by the <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code> module. Make sure
4f9c22c4f27571d54197be9674e1fc0d528192aestriker that the chosen provider module is present in the server.</p>
a9a4544168a37b43bd180b3703ccee995f27a80awrowe
a9a4544168a37b43bd180b3703ccee995f27a80awrowe <div class="example"><h3>Example</h3><p><code>
a9a4544168a37b43bd180b3703ccee995f27a80awrowe &lt;Location /secure&gt;<br />
a9a4544168a37b43bd180b3703ccee995f27a80awrowe <span class="indent">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker AuthType form<br />
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar AuthName "private area"<br />
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe AuthFormProvider dbm<br />
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar AuthDBMType SDBM<br />
731344ed8f3677d1661c261ca5fcdd2ee3dbc74ccoar AuthDBMUserFile /www/etc/dbmpasswd<br />
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe Require valid-user<br />
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe ...<br />
4f9c22c4f27571d54197be9674e1fc0d528192aestriker </span>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe &lt;/Location&gt;
8aefbd756763807188d2e3ce336a8680e4893066wrowe </code></p></div>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>Providers are implemented by <code class="module"><a href="/mod/mod_authn_dbm.html">mod_authn_dbm</a></code>,
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <code class="module"><a href="/mod/mod_authn_file.html">mod_authn_file</a></code>, <code class="module"><a href="/mod/mod_authn_dbd.html">mod_authn_dbd</a></code>,
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe and <code class="module"><a href="/mod/mod_authnz_ldap.html">mod_authnz_ldap</a></code>.</p>
700b96db75e7cfadb5219978c1735b710d583763wrowe
cf6ef072483172309861d06e85b1aeff4573c060wrowe</div>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<div class="directive-section"><h2><a name="AuthFormSitePassphrase" id="AuthFormSitePassphrase">AuthFormSitePassphrase</a> <a name="authformsitepassphrase" id="authformsitepassphrase">Directive</a></h2>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<table class="directive">
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Bypass authentication checks for high traffic sites</td></tr>
8aefbd756763807188d2e3ce336a8680e4893066wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormSitePassphrase <var>secret</var></code></td></tr>
0e58e92812f2f679d6bf2ff66cbcfa6c1d1e14bbjerenkrantz<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>none</code></td></tr>
0e58e92812f2f679d6bf2ff66cbcfa6c1d1e14bbjerenkrantz<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
0e58e92812f2f679d6bf2ff66cbcfa6c1d1e14bbjerenkrantz<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
cf6ef072483172309861d06e85b1aeff4573c060wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</table>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <p>The <code class="directive"><a href="#authformsitepassphrase">AuthFormSitePassphrase</a></code> directive
4f9c22c4f27571d54197be9674e1fc0d528192aestriker specifies a passphrase which, if present in the user session, causes Apache to
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe bypass authentication checks for the given URL. It can be used on high traffic websites
4f9c22c4f27571d54197be9674e1fc0d528192aestriker to reduce the load induced on authentication infrastructure.</p>
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe <p>The passphrase can be inserted into a user session by adding this directive to the
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe configuration for the <var>form-login-handler</var>. The <var>form-login-handler</var>
8aefbd756763807188d2e3ce336a8680e4893066wrowe itself will always run the authentication checks, regardless of whether a passphrase
e4a3f3c2f080cac75a15a6454cca429b8161c050wrowe is specified or not.</p>
700b96db75e7cfadb5219978c1735b710d583763wrowe
700b96db75e7cfadb5219978c1735b710d583763wrowe <div class="warning"><h3>Warning</h3>
700b96db75e7cfadb5219978c1735b710d583763wrowe <p>If the session is exposed to the user through the use of
700b96db75e7cfadb5219978c1735b710d583763wrowe <code class="module"><a href="/mod/mod_session_cookie.html">mod_session_cookie</a></code>, and the session is not protected with
8aefbd756763807188d2e3ce336a8680e4893066wrowe <code class="module"><a href="/mod/mod_session_crypto.html">mod_session_crypto</a></code>, the passphrase is open to potential exposure
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe through a dictionary attack. Regardless of how the session is configured,
4f9c22c4f27571d54197be9674e1fc0d528192aestriker ensure that this directive is not used within URL spaces where private user data
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe could be exposed, or sensitive transactions can be conducted. Use at own risk.</p>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe </div>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</div>
59513b1275fdc2021d4949ee03ae8229469abb86wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<div class="directive-section"><h2><a name="AuthFormSize" id="AuthFormSize">AuthFormSize</a> <a name="authformsize" id="authformsize">Directive</a></h2>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<table class="directive">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The largest size of the form in bytes that will be parsed for the login details</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormBody <var>size</var></code></td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>8192</code></td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</table>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <p>The <code class="directive"><a href="#authformsize">AuthFormSize</a></code> directive specifies
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe the maximum size of the body of the request that will be parsed to find the login form.</p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <p>If a login request arrives that exceeds this size, the whole request will be aborted
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe with the HTTP response code <code>HTTP_REQUEST_TOO_LARGE</code>.</p>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <p>If you have populated the form with fields described by
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <code class="directive"><a href="#authformmethod">AuthFormMethod</a></code>,
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <code class="directive"><a href="#authformmimetype">AuthFormMimetype</a></code> and
cf6ef072483172309861d06e85b1aeff4573c060wrowe <code class="directive"><a href="#authformbody">AuthFormBody</a></code>, you probably want to set this
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe field to a similar size as the <code class="directive"><a href="/mod/core.html#keptbodysize">KeptBodySize</a></code>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe directive.</p>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker</div>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<div class="directive-section"><h2><a name="AuthFormUsername" id="AuthFormUsername">AuthFormUsername</a> <a name="authformusername" id="authformusername">Directive</a></h2>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<table class="directive">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The name of a form field carrying the login username</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthFormUsername <var>fieldname</var></code></td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>httpd_username</code></td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_auth_form</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.0 and later</td></tr>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</table>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe <p>The <code class="directive"><a href="#authformusername">AuthFormUsername</a></code> directive specifies
4f9c22c4f27571d54197be9674e1fc0d528192aestriker the name of an HTML field which, if present, will contain the username to be used to log
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe in.</p>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe
4f9c22c4f27571d54197be9674e1fc0d528192aestriker</div>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</div>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<div class="bottomlang">
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<p><span>Available Languages: </span><a href="/en/mod/mod_auth_form.html" title="English">&nbsp;en&nbsp;</a></p>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</div><div id="footer">
4f9c22c4f27571d54197be9674e1fc0d528192aestriker<p class="apache">Copyright 2008 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
1b315ee865b0f11e582beb64127ca3a99a319d2fwrowe</body></html>