1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5
This file is generated from xml source: DO NOT EDIT
6
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8
<title>mod_authn_dbd - Apache HTTP Server</title>
9
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
14
<div id="page-header">
15
<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>
16
<p class="apache">Apache HTTP Server Version 2.2</p>
17
<img alt="" src="../images/feather.gif" /></div>
18
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div>
21
<div id="page-content">
22
<div id="preamble"><h1>Apache Module mod_authn_dbd</h1>
24
<p><span>Available Languages: </span><a href="../en/mod/mod_authn_dbd.html" title="English"> en </a></p>
26
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User authentication using an SQL database</td></tr>
27
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
28
<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>authn_dbd_module</td></tr>
29
<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_authn_dbd.c</td></tr>
30
<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1 and later</td></tr></table>
33
<p>This module provides authentication front-ends such as
34
<code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code> and <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>
35
to authenticate users by looking up users in SQL tables.
36
Similar functionality is provided by, for example,
37
<code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>.</p>
38
<p>This module relies on <code class="module"><a href="../mod/mod_dbd.html">mod_dbd</a></code> to specify
39
the backend database driver and connection parameters, and
40
manage the database connections.</p>
42
<p>When using <code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code> or
43
<code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code>, this module is invoked via the
44
<code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code> or
45
<code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
46
with the <code>dbd</code> value.</p>
48
<div id="quickview"><h3 class="directives">Directives</h3>
50
<li><img alt="" src="../images/down.gif" /> <a href="#authdbduserpwquery">AuthDBDUserPWQuery</a></li>
51
<li><img alt="" src="../images/down.gif" /> <a href="#authdbduserrealmquery">AuthDBDUserRealmQuery</a></li>
55
<li><img alt="" src="../images/down.gif" /> <a href="#example">Configuration Example</a></li>
56
</ul><h3>See also</h3>
58
<li><code class="directive"><a href="../mod/core.html#authname">AuthName</a></code></li>
59
<li><code class="directive"><a href="../mod/core.html#authtype">AuthType</a></code></li>
61
<code class="directive"><a href="../mod/mod_auth_basic.html#authbasicprovider">AuthBasicProvider</a></code>
64
<code class="directive"><a href="../mod/mod_auth_digest.html#authdigestprovider">AuthDigestProvider</a></code>
66
<li><code class="directive"><a href="../mod/mod_dbd.html#dbdriver">DBDriver</a></code></li>
67
<li><code class="directive"><a href="../mod/mod_dbd.html#dbdparams">DBDParams</a></code></li>
69
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
71
<h2><a name="example" id="example">Configuration Example</a></h2>
73
<p>This simple example shows use of this module in the context of
74
the Authentication and DBD frameworks.</p>
75
<div class="example"><pre>
78
#Use the PostgreSQL driver
79
<code>DBDriver pgsql</code>
81
#Connection string: database name and login credentials
82
<code>DBDParams "dbname=htpasswd user=apache password=xxxxxx"</code>
84
#Parameters for Connection Pool Management
90
#Authentication Section
91
<code><Directory /usr/www/myhost/private></code>
93
#mod_auth configuration for authn_dbd
96
AuthBasicProvider dbd</code>
99
<code>Require valid-user</code>
101
#SQL query to verify a user
102
#(note: DBD drivers recognise both stdio-like %s and native syntax)
103
<code>AuthDBDUserPWQuery "select password from authn where username = %s"
104
</Directory></code>
107
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
108
<div class="directive-section"><h2><a name="AuthDBDUserPWQuery" id="AuthDBDUserPWQuery">AuthDBDUserPWQuery</a> <a name="authdbduserpwquery" id="authdbduserpwquery">Directive</a></h2>
109
<table class="directive">
110
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SQL query to look up a password for a user</td></tr>
111
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthDBDUserPWQuery <var>query</var></code></td></tr>
112
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
113
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
114
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authn_dbd</td></tr>
116
<p>The <code class="directive">AuthDBDUserPWQuery</code> specifies an
117
SQL query to look up a password for a specified user.
118
The query must take a single string (typically SQL varchar)
119
argument (username), and return a single value (encrypted password).
121
<div class="example"><p><code>
122
AuthDBDUserPWQuery "SELECT password FROM authn WHERE username = %s"
127
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
128
<div class="directive-section"><h2><a name="AuthDBDUserRealmQuery" id="AuthDBDUserRealmQuery">AuthDBDUserRealmQuery</a> <a name="authdbduserrealmquery" id="authdbduserrealmquery">Directive</a></h2>
129
<table class="directive">
130
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SQL query to look up a password hash for a user and realm.
132
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthDBDUserRealmQuery <var>query</var></code></td></tr>
133
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
134
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
135
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authn_dbd</td></tr>
137
<p>The <code class="directive">AuthDBDUserRealmQuery</code> specifies an
138
SQL query to look up a password for a specified user and realm.
139
The query must take two string (typically SQL varchar) arguments
140
(username and realm), and return a single value (encrypted password).
142
<div class="example"><p><code>
143
AuthDBDUserRealmQuery "SELECT password FROM authn
144
WHERE username = %s AND realm = %s"
150
<div class="bottomlang">
151
<p><span>Available Languages: </span><a href="../en/mod/mod_authn_dbd.html" title="English"> en </a></p>
152
</div><div id="footer">
153
<p class="apache">Copyright 2006 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>
154
<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>
b'\\ No newline at end of file'