/usr/share/doc/ocsigenserver/api-html/Authbasic.html is in ocsigenserver-doc 2.6-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Accesscontrol.html">
<link rel="next" href="Ocsipersist.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Ocsigen_cache" rel="Chapter" href="Ocsigen_cache.html">
<link title="Ocsigen_lib_base" rel="Chapter" href="Ocsigen_lib_base.html">
<link title="Ocsigen_lib" rel="Chapter" href="Ocsigen_lib.html">
<link title="Ocsigen_config" rel="Chapter" href="Ocsigen_config.html">
<link title="Ocsigen_getcommandline" rel="Chapter" href="Ocsigen_getcommandline.html">
<link title="Ocsigen_messages" rel="Chapter" href="Ocsigen_messages.html">
<link title="Ocsigen_stream" rel="Chapter" href="Ocsigen_stream.html">
<link title="Ocsigen_loader" rel="Chapter" href="Ocsigen_loader.html">
<link title="Polytables" rel="Chapter" href="Polytables.html">
<link title="Http_headers" rel="Chapter" href="Http_headers.html">
<link title="Ocsigen_http_frame" rel="Chapter" href="Ocsigen_http_frame.html">
<link title="Ocsigen_headers" rel="Chapter" href="Ocsigen_headers.html">
<link title="Framepp" rel="Chapter" href="Framepp.html">
<link title="Ocsigen_http_com" rel="Chapter" href="Ocsigen_http_com.html">
<link title="Ocsigen_charset_mime" rel="Chapter" href="Ocsigen_charset_mime.html">
<link title="Ocsigen_senders" rel="Chapter" href="Ocsigen_senders.html">
<link title="Ocsigen_cookies" rel="Chapter" href="Ocsigen_cookies.html">
<link title="Ocsigen_extensions" rel="Chapter" href="Ocsigen_extensions.html">
<link title="Ocsigen_parseconfig" rel="Chapter" href="Ocsigen_parseconfig.html">
<link title="Ocsigen_http_client" rel="Chapter" href="Ocsigen_http_client.html">
<link title="Ocsigen_local_files" rel="Chapter" href="Ocsigen_local_files.html">
<link title="Ocsigen_server" rel="Chapter" href="Ocsigen_server.html">
<link title="Ocsigen_request_info" rel="Chapter" href="Ocsigen_request_info.html">
<link title="Ocsigen_comet" rel="Chapter" href="Ocsigen_comet.html">
<link title="Accesscontrol" rel="Chapter" href="Accesscontrol.html">
<link title="Authbasic" rel="Chapter" href="Authbasic.html">
<link title="Ocsipersist" rel="Chapter" href="Ocsipersist.html"><title>Authbasic</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Accesscontrol.html" title="Accesscontrol">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Ocsipersist.html" title="Ocsipersist">Next</a>
</div>
<h1>Module <a href="type_Authbasic.html">Authbasic</a></h1>
<pre><span class="keyword">module</span> Authbasic: <code class="code">sig</code> <a href="Authbasic.html">..</a> <code class="code">end</code></pre><div class="info module top">
Module <code class="code">Authbasic</code>: Basic HTTP Authentication.<br>
</div>
<hr width="100%">
<br>
This module implements Basic HTTP Authentication as described in
<a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a>. It can be used
to add an authentication layer to sites with no built-in
authentication (e.g. static files). Beware, passwords are
transmitted in cleartext with this scheme, so the medium should be
secured somehow (by e.g. SSL).
<p>
This module implements only the HTTP-related part of the protocol,
and is meant to be extended with various authentication schemes. A
very naive one (authentication with a single user/password, given
in the configuration file) is provided.<br>
<pre><span id="VALregister_basic_authentication_method"><span class="keyword">val</span> register_basic_authentication_method</span> : <code class="type">(Simplexmlparser.xml -> string -> string -> bool Lwt.t) -> unit</code></pre><div class="info ">
This function registers an authentication plugin: it adds a new
parser to the list of available authentication schemes.
<p>
A parser takes as argument an XML tree (corresponding to the
first son of an <authbasic> element in the configuration
file) and returns an authentication function <code class="code">f</code>. <code class="code">f</code> will be
called for each request with the supplied user and password and
should return (cooperatively) a boolean telling whether access
is granted or not. Exceptions are handled the same way as for
extension parsers.
<p>
The <authbasic> element must have a <i>realm</i> attribute,
giving some identifier to the resource which is protected
(several resources on the same hostname can share the same
realm). This gives a general customization scheme "for free"
from the point of view of plugin developers and is totally
transparent to the plugin.<br>
</div>
<pre><span id="VALget_basic_authentication_method"><span class="keyword">val</span> get_basic_authentication_method</span> : <code class="type">Simplexmlparser.xml -> string -> string -> bool Lwt.t</code></pre><div class="info ">
This function combines all the parsers registered with
<code class="code">register_basic_authentication_method</code>. It might be useful for
other extensions. Not for the casual user.<br>
</div>
</body></html>
|