summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_authz_dbd.html.en
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2014-03-29 21:56:19 +0100
committerStefan Fritsch <sf@sfritsch.de>2014-03-29 21:56:45 +0100
commit2a463b3cd73c32ee9dcd508248d0194923f435f4 (patch)
tree2ff478255a77a55031056790918b6f983bb7b20a /docs/manual/mod/mod_authz_dbd.html.en
parent86d5cc79d9d6750da8771fdb0c9ab22c19b8ad45 (diff)
downloadapache2-upstream/2.4.9.tar.gz
Imported Upstream version 2.4.9upstream/2.4.9
Diffstat (limited to 'docs/manual/mod/mod_authz_dbd.html.en')
-rw-r--r--docs/manual/mod/mod_authz_dbd.html.en73
1 files changed, 56 insertions, 17 deletions
diff --git a/docs/manual/mod/mod_authz_dbd.html.en b/docs/manual/mod/mod_authz_dbd.html.en
index 10de677c..431ad7e2 100644
--- a/docs/manual/mod/mod_authz_dbd.html.en
+++ b/docs/manual/mod/mod_authz_dbd.html.en
@@ -9,7 +9,7 @@
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
-<script src="../style/scripts/prettify.js" type="text/javascript">
+<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
@@ -56,6 +56,7 @@
</ul>
<h3>Topics</h3>
<ul id="topics">
+<li><img alt="" src="../images/down.gif" /> <a href="#requiredirectives">The Require Directives</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#login">Database Login</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#client">Client Login</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#example">Configuration example</a></li>
@@ -70,6 +71,52 @@
</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
+<h2><a name="requiredirectives" id="requiredirectives">The Require Directives</a></h2>
+
+ <p>Apache's <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>
+ directives are used during the authorization phase to ensure that
+ a user is allowed to access a resource. mod_authz_dbd extends the
+ authorization types with <code>dbd-group</code>, <code>dbd-login</code> and
+ <code>dbd-logout</code>.</p>
+
+ <p>Since v2.5.0, <a href="../expr.html">expressions</a> are supported
+ within the DBD require directives.</p>
+
+<h3><a name="reqgroup" id="reqgroup">Require dbd-group</a></h3>
+
+ <p>This directive specifies group membership that is required for the
+ user to gain access.</p>
+
+ <pre class="prettyprint lang-config"> Require dbd-group team
+ AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"</pre>
+
+
+
+
+<h3><a name="reqlogin" id="reqlogin">Require dbd-login</a></h3>
+
+ <p>This directive specifies a query to be run indicating the user
+ has logged in.</p>
+
+ <pre class="prettyprint lang-config"> Require dbd-login
+ AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"</pre>
+
+
+
+
+<h3><a name="reqlogout" id="reqlogout">Require dbd-logout</a></h3>
+
+ <p>This directive specifies a query to be run indicating the user
+ has logged out.</p>
+
+ <pre class="prettyprint lang-config"> Require dbd-logout
+ AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"</pre>
+
+
+
+
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
<h2><a name="login" id="login">Database Login</a></h2>
<p>
@@ -99,8 +146,7 @@ to implement functions that start and end client-side sessions.</p>
<div class="section">
<h2><a name="example" id="example">Configuration example</a></h2>
-<pre class="prettyprint lang-config">
-# mod_dbd configuration
+<pre class="prettyprint lang-config"># mod_dbd configuration
DBDriver pgsql
DBDParams "dbname=apacheauth user=apache pass=xxxxxx"
@@ -149,8 +195,7 @@ DBDExptime 300
Require dbd-logout
AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
&lt;/Files&gt;
-&lt;/Directory&gt;
-</pre>
+&lt;/Directory&gt;</pre>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -194,10 +239,8 @@ header is present</td></tr>
The first column value of each row returned by the query statement
should be a string containing a group name. Zero, one, or more rows
may be returned.
- <pre class="prettyprint lang-config">
-Require dbd-group
-AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"
-</pre>
+ <pre class="prettyprint lang-config">Require dbd-group
+AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"</pre>
</li>
<li>When used with a <code>Require dbd-login</code> or
@@ -205,10 +248,8 @@ AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"
but will instead execute a SQL statement designed to log the user
in or out. The user must already be authenticated with
<code class="module"><a href="../mod/mod_authn_dbd.html">mod_authn_dbd</a></code>.
- <pre class="prettyprint lang-config">
-Require dbd-login
-AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
-</pre>
+ <pre class="prettyprint lang-config">Require dbd-login
+AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"</pre>
</li>
</ul>
@@ -231,9 +272,7 @@ AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
specific to the user. The user's ID will be passed as a single string
parameter when the SQL query is executed. It may be referenced within
the query statement using a <code>%s</code> format specifier.</p>
- <pre class="prettyprint lang-config">
-AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"
-</pre>
+ <pre class="prettyprint lang-config">AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"</pre>
<p>The first column value of the first row returned by the query
statement should be a string containing a URL to which to redirect
@@ -265,7 +304,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_authz_dbd.ht
}
})(window, document);
//--><!]]></script></div><div id="footer">
-<p class="apache">Copyright 2013 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>
+<p class="apache">Copyright 2014 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>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();