mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Generate documentation
This commit is contained in:
parent
35998c789a
commit
bdab9308bb
1 changed files with 117 additions and 111 deletions
228
master.html
228
master.html
|
@ -654,6 +654,12 @@ values don't matter and you can keep the defaults.</p>
|
||||||
<span id="cb23-3"><a aria-hidden="true" href="#cb23-3" tabindex="-1"></a><span class="dt">certificate </span><span class="ot">=</span><span class="st"> /path/to/server_cert.pem</span></span>
|
<span id="cb23-3"><a aria-hidden="true" href="#cb23-3" tabindex="-1"></a><span class="dt">certificate </span><span class="ot">=</span><span class="st"> /path/to/server_cert.pem</span></span>
|
||||||
<span id="cb23-4"><a aria-hidden="true" href="#cb23-4" tabindex="-1"></a><span class="dt">key </span><span class="ot">=</span><span class="st"> /path/to/server_key.pem</span></span>
|
<span id="cb23-4"><a aria-hidden="true" href="#cb23-4" tabindex="-1"></a><span class="dt">key </span><span class="ot">=</span><span class="st"> /path/to/server_key.pem</span></span>
|
||||||
<span id="cb23-5"><a aria-hidden="true" href="#cb23-5" tabindex="-1"></a><span class="dt">certificate_authority </span><span class="ot">=</span><span class="st"> /path/to/client_cert.pem</span></span></code></pre></div>
|
<span id="cb23-5"><a aria-hidden="true" href="#cb23-5" tabindex="-1"></a><span class="dt">certificate_authority </span><span class="ot">=</span><span class="st"> /path/to/client_cert.pem</span></span></code></pre></div>
|
||||||
|
<p>If you're using the Let's Encrypt's Certbot, the configuration should
|
||||||
|
look similar to this:</p>
|
||||||
|
<div class="sourceCode" id="cb24"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb24-1"><a aria-hidden="true" href="#cb24-1" tabindex="-1"></a><span class="kw">[server]</span></span>
|
||||||
|
<span id="cb24-2"><a aria-hidden="true" href="#cb24-2" tabindex="-1"></a><span class="dt">ssl </span><span class="ot">=</span><span class="st"> </span><span class="kw">True</span></span>
|
||||||
|
<span id="cb24-3"><a aria-hidden="true" href="#cb24-3" tabindex="-1"></a><span class="dt">certificate </span><span class="ot">=</span><span class="st"> /etc/letsencrypt/live/{Your Domain}/fullchain.pem</span></span>
|
||||||
|
<span id="cb24-4"><a aria-hidden="true" href="#cb24-4" tabindex="-1"></a><span class="dt">key </span><span class="ot">=</span><span class="st"> /etc/letsencrypt/live/{Your Domain}/privkey.pem</span></span></code></pre></div>
|
||||||
<p>Example <strong>nginx</strong> configuration:</p>
|
<p>Example <strong>nginx</strong> configuration:</p>
|
||||||
<pre class="nginx"><code>location /radicale/ {
|
<pre class="nginx"><code>location /radicale/ {
|
||||||
proxy_pass https://localhost:5232/;
|
proxy_pass https://localhost:5232/;
|
||||||
|
@ -672,15 +678,15 @@ values don't matter and you can keep the defaults.</p>
|
||||||
environment variable, otherwise no configuration file is loaded and the
|
environment variable, otherwise no configuration file is loaded and the
|
||||||
default configuration is used.</p>
|
default configuration is used.</p>
|
||||||
<p>Example <strong>uWSGI</strong> configuration:</p>
|
<p>Example <strong>uWSGI</strong> configuration:</p>
|
||||||
<div class="sourceCode" id="cb25"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb25-1"><a aria-hidden="true" href="#cb25-1" tabindex="-1"></a><span class="kw">[uwsgi]</span></span>
|
<div class="sourceCode" id="cb26"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb26-1"><a aria-hidden="true" href="#cb26-1" tabindex="-1"></a><span class="kw">[uwsgi]</span></span>
|
||||||
<span id="cb25-2"><a aria-hidden="true" href="#cb25-2" tabindex="-1"></a><span class="dt">http-socket </span><span class="ot">=</span><span class="st"> 127.0.0.1:5232</span></span>
|
<span id="cb26-2"><a aria-hidden="true" href="#cb26-2" tabindex="-1"></a><span class="dt">http-socket </span><span class="ot">=</span><span class="st"> 127.0.0.1:5232</span></span>
|
||||||
<span id="cb25-3"><a aria-hidden="true" href="#cb25-3" tabindex="-1"></a><span class="dt">processes </span><span class="ot">=</span><span class="st"> </span><span class="dv">8</span></span>
|
<span id="cb26-3"><a aria-hidden="true" href="#cb26-3" tabindex="-1"></a><span class="dt">processes </span><span class="ot">=</span><span class="st"> </span><span class="dv">8</span></span>
|
||||||
<span id="cb25-4"><a aria-hidden="true" href="#cb25-4" tabindex="-1"></a><span class="dt">plugin </span><span class="ot">=</span><span class="st"> python3</span></span>
|
<span id="cb26-4"><a aria-hidden="true" href="#cb26-4" tabindex="-1"></a><span class="dt">plugin </span><span class="ot">=</span><span class="st"> python3</span></span>
|
||||||
<span id="cb25-5"><a aria-hidden="true" href="#cb25-5" tabindex="-1"></a><span class="dt">module </span><span class="ot">=</span><span class="st"> radicale</span></span>
|
<span id="cb26-5"><a aria-hidden="true" href="#cb26-5" tabindex="-1"></a><span class="dt">module </span><span class="ot">=</span><span class="st"> radicale</span></span>
|
||||||
<span id="cb25-6"><a aria-hidden="true" href="#cb25-6" tabindex="-1"></a><span class="dt">env </span><span class="ot">=</span><span class="st"> RADICALE_CONFIG=/etc/radicale/config</span></span></code></pre></div>
|
<span id="cb26-6"><a aria-hidden="true" href="#cb26-6" tabindex="-1"></a><span class="dt">env </span><span class="ot">=</span><span class="st"> RADICALE_CONFIG=/etc/radicale/config</span></span></code></pre></div>
|
||||||
<p>Example <strong>Gunicorn</strong> configuration:</p>
|
<p>Example <strong>Gunicorn</strong> configuration:</p>
|
||||||
<div class="sourceCode" id="cb26"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb26-1"><a aria-hidden="true" href="#cb26-1" tabindex="-1"></a><span class="ex">gunicorn</span> <span class="at">--bind</span> <span class="st">'127.0.0.1:5232'</span> <span class="at">--env</span> <span class="st">'RADICALE_CONFIG=/etc/radicale/config'</span> <span class="dt">\</span></span>
|
<div class="sourceCode" id="cb27"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb27-1"><a aria-hidden="true" href="#cb27-1" tabindex="-1"></a><span class="ex">gunicorn</span> <span class="at">--bind</span> <span class="st">'127.0.0.1:5232'</span> <span class="at">--env</span> <span class="st">'RADICALE_CONFIG=/etc/radicale/config'</span> <span class="dt">\</span></span>
|
||||||
<span id="cb26-2"><a aria-hidden="true" href="#cb26-2" tabindex="-1"></a> <span class="at">--workers</span> 8 radicale</span></code></pre></div>
|
<span id="cb27-2"><a aria-hidden="true" href="#cb27-2" tabindex="-1"></a> <span class="at">--workers</span> 8 radicale</span></code></pre></div>
|
||||||
<section class="level4" id="manage-user-accounts-with-the-wsgi-server">
|
<section class="level4" id="manage-user-accounts-with-the-wsgi-server">
|
||||||
<h4>Manage user accounts with the WSGI server <a class="headerlink" href="#manage-user-accounts-with-the-wsgi-server">¶</a></h4>
|
<h4>Manage user accounts with the WSGI server <a class="headerlink" href="#manage-user-accounts-with-the-wsgi-server">¶</a></h4>
|
||||||
<p>Set the configuration option <code>type</code> in the
|
<p>Set the configuration option <code>type</code> in the
|
||||||
|
@ -703,7 +709,7 @@ content:</p>
|
||||||
.Radicale.tmp-*</code></pre>
|
.Radicale.tmp-*</code></pre>
|
||||||
<p>The configuration option <code>hook</code> in the
|
<p>The configuration option <code>hook</code> in the
|
||||||
<code>storage</code> section must be set to the following command:</p>
|
<code>storage</code> section must be set to the following command:</p>
|
||||||
<div class="sourceCode" id="cb28"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a aria-hidden="true" href="#cb28-1" tabindex="-1"></a><span class="fu">git</span> add <span class="at">-A</span> <span class="kw">&&</span> <span class="kw">(</span><span class="fu">git</span> diff <span class="at">--cached</span> <span class="at">--quiet</span> <span class="kw">||</span> <span class="fu">git</span> commit <span class="at">-m</span> <span class="st">"Changes by "</span>%<span class="er">(</span><span class="ex">user</span><span class="kw">)</span><span class="ex">s</span><span class="kw">)</span></span></code></pre></div>
|
<div class="sourceCode" id="cb29"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a aria-hidden="true" href="#cb29-1" tabindex="-1"></a><span class="fu">git</span> add <span class="at">-A</span> <span class="kw">&&</span> <span class="kw">(</span><span class="fu">git</span> diff <span class="at">--cached</span> <span class="at">--quiet</span> <span class="kw">||</span> <span class="fu">git</span> commit <span class="at">-m</span> <span class="st">"Changes by "</span>%<span class="er">(</span><span class="ex">user</span><span class="kw">)</span><span class="ex">s</span><span class="kw">)</span></span></code></pre></div>
|
||||||
<p>The command gets executed after every change to the storage and
|
<p>The command gets executed after every change to the storage and
|
||||||
commits the changes into the <strong>git</strong> repository.</p>
|
commits the changes into the <strong>git</strong> repository.</p>
|
||||||
</section>
|
</section>
|
||||||
|
@ -715,17 +721,17 @@ commits the changes into the <strong>git</strong> repository.</p>
|
||||||
<p>Radicale can be configured with a configuration file or with command
|
<p>Radicale can be configured with a configuration file or with command
|
||||||
line arguments.</p>
|
line arguments.</p>
|
||||||
<p>An example configuration file looks like:</p>
|
<p>An example configuration file looks like:</p>
|
||||||
<div class="sourceCode" id="cb29"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb29-1"><a aria-hidden="true" href="#cb29-1" tabindex="-1"></a><span class="kw">[server]</span></span>
|
<div class="sourceCode" id="cb30"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb30-1"><a aria-hidden="true" href="#cb30-1" tabindex="-1"></a><span class="kw">[server]</span></span>
|
||||||
<span id="cb29-2"><a aria-hidden="true" href="#cb29-2" tabindex="-1"></a><span class="co"># Bind all addresses</span></span>
|
<span id="cb30-2"><a aria-hidden="true" href="#cb30-2" tabindex="-1"></a><span class="co"># Bind all addresses</span></span>
|
||||||
<span id="cb29-3"><a aria-hidden="true" href="#cb29-3" tabindex="-1"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> 0.0.0.0:5232, [::]:5232</span></span>
|
<span id="cb30-3"><a aria-hidden="true" href="#cb30-3" tabindex="-1"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> 0.0.0.0:5232, [::]:5232</span></span>
|
||||||
<span id="cb29-4"><a aria-hidden="true" href="#cb29-4" tabindex="-1"></a></span>
|
<span id="cb30-4"><a aria-hidden="true" href="#cb30-4" tabindex="-1"></a></span>
|
||||||
<span id="cb29-5"><a aria-hidden="true" href="#cb29-5" tabindex="-1"></a><span class="kw">[auth]</span></span>
|
<span id="cb30-5"><a aria-hidden="true" href="#cb30-5" tabindex="-1"></a><span class="kw">[auth]</span></span>
|
||||||
<span id="cb29-6"><a aria-hidden="true" href="#cb29-6" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> htpasswd</span></span>
|
<span id="cb30-6"><a aria-hidden="true" href="#cb30-6" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> htpasswd</span></span>
|
||||||
<span id="cb29-7"><a aria-hidden="true" href="#cb29-7" tabindex="-1"></a><span class="dt">htpasswd_filename </span><span class="ot">=</span><span class="st"> ~/.config/radicale/users</span></span>
|
<span id="cb30-7"><a aria-hidden="true" href="#cb30-7" tabindex="-1"></a><span class="dt">htpasswd_filename </span><span class="ot">=</span><span class="st"> ~/.config/radicale/users</span></span>
|
||||||
<span id="cb29-8"><a aria-hidden="true" href="#cb29-8" tabindex="-1"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span>
|
<span id="cb30-8"><a aria-hidden="true" href="#cb30-8" tabindex="-1"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span>
|
||||||
<span id="cb29-9"><a aria-hidden="true" href="#cb29-9" tabindex="-1"></a></span>
|
<span id="cb30-9"><a aria-hidden="true" href="#cb30-9" tabindex="-1"></a></span>
|
||||||
<span id="cb29-10"><a aria-hidden="true" href="#cb29-10" tabindex="-1"></a><span class="kw">[storage]</span></span>
|
<span id="cb30-10"><a aria-hidden="true" href="#cb30-10" tabindex="-1"></a><span class="kw">[storage]</span></span>
|
||||||
<span id="cb29-11"><a aria-hidden="true" href="#cb29-11" tabindex="-1"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> ~/.var/lib/radicale/collections</span></span></code></pre></div>
|
<span id="cb30-11"><a aria-hidden="true" href="#cb30-11" tabindex="-1"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> ~/.var/lib/radicale/collections</span></span></code></pre></div>
|
||||||
<p>Radicale tries to load configuration files from
|
<p>Radicale tries to load configuration files from
|
||||||
<code>/etc/radicale/config</code> and
|
<code>/etc/radicale/config</code> and
|
||||||
<code>~/.config/radicale/config</code>. Custom paths can be specified
|
<code>~/.config/radicale/config</code>. Custom paths can be specified
|
||||||
|
@ -736,9 +742,9 @@ configuration files can be separated by <code>:</code> (resp.
|
||||||
optional.</p>
|
optional.</p>
|
||||||
<p>The same example configuration via command line arguments looks
|
<p>The same example configuration via command line arguments looks
|
||||||
like:</p>
|
like:</p>
|
||||||
<div class="sourceCode" id="cb30"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a aria-hidden="true" href="#cb30-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> radicale <span class="at">--server-hosts</span> 0.0.0.0:5232,[::]:5232 <span class="dt">\</span></span>
|
<div class="sourceCode" id="cb31"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a aria-hidden="true" href="#cb31-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> radicale <span class="at">--server-hosts</span> 0.0.0.0:5232,[::]:5232 <span class="dt">\</span></span>
|
||||||
<span id="cb30-2"><a aria-hidden="true" href="#cb30-2" tabindex="-1"></a> <span class="at">--auth-type</span> htpasswd <span class="at">--auth-htpasswd-filename</span> ~/.config/radicale/users <span class="dt">\</span></span>
|
<span id="cb31-2"><a aria-hidden="true" href="#cb31-2" tabindex="-1"></a> <span class="at">--auth-type</span> htpasswd <span class="at">--auth-htpasswd-filename</span> ~/.config/radicale/users <span class="dt">\</span></span>
|
||||||
<span id="cb30-3"><a aria-hidden="true" href="#cb30-3" tabindex="-1"></a> <span class="at">--auth-htpasswd-encryption</span> md5</span></code></pre></div>
|
<span id="cb31-3"><a aria-hidden="true" href="#cb31-3" tabindex="-1"></a> <span class="at">--auth-htpasswd-encryption</span> md5</span></code></pre></div>
|
||||||
<p>Add the argument <code>--config ""</code> to stop Radicale from
|
<p>Add the argument <code>--config ""</code> to stop Radicale from
|
||||||
loading the default configuration files. Run
|
loading the default configuration files. Run
|
||||||
<code>python3 -m radicale --help</code> for more information.</p>
|
<code>python3 -m radicale --help</code> for more information.</p>
|
||||||
|
@ -950,7 +956,7 @@ books and calendars.</p>
|
||||||
<p>In this section additional HTTP headers that are sent to clients can
|
<p>In this section additional HTTP headers that are sent to clients can
|
||||||
be specified.</p>
|
be specified.</p>
|
||||||
<p>An example to relax the same-origin policy:</p>
|
<p>An example to relax the same-origin policy:</p>
|
||||||
<div class="sourceCode" id="cb32"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb32-1"><a aria-hidden="true" href="#cb32-1" tabindex="-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div>
|
<div class="sourceCode" id="cb33"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb33-1"><a aria-hidden="true" href="#cb33-1" tabindex="-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="level3" id="supported-clients">
|
<section class="level3" id="supported-clients">
|
||||||
|
@ -1020,47 +1026,47 @@ documentation of <strong>InfCloud</strong> has more details on this.</p>
|
||||||
calendars and address books. Use Radicale's web interface or a client
|
calendars and address books. Use Radicale's web interface or a client
|
||||||
with support for it (e.g. <strong>DAVx⁵</strong>).</p>
|
with support for it (e.g. <strong>DAVx⁵</strong>).</p>
|
||||||
<p>To create a new calendar run something like:</p>
|
<p>To create a new calendar run something like:</p>
|
||||||
<div class="sourceCode" id="cb33"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb33-1"><a aria-hidden="true" href="#cb33-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> <span class="at">--data</span> <span class="dt">\</span></span>
|
<div class="sourceCode" id="cb34"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb34-1"><a aria-hidden="true" href="#cb34-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> <span class="at">--data</span> <span class="dt">\</span></span>
|
||||||
<span id="cb33-2"><a aria-hidden="true" href="#cb33-2" tabindex="-1"></a><span class="st">'<?xml version="1.0" encoding="UTF-8" ?></span></span>
|
|
||||||
<span id="cb33-3"><a aria-hidden="true" href="#cb33-3" tabindex="-1"></a><span class="st"><create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"></span></span>
|
|
||||||
<span id="cb33-4"><a aria-hidden="true" href="#cb33-4" tabindex="-1"></a><span class="st"> <set></span></span>
|
|
||||||
<span id="cb33-5"><a aria-hidden="true" href="#cb33-5" tabindex="-1"></a><span class="st"> <prop></span></span>
|
|
||||||
<span id="cb33-6"><a aria-hidden="true" href="#cb33-6" tabindex="-1"></a><span class="st"> <resourcetype></span></span>
|
|
||||||
<span id="cb33-7"><a aria-hidden="true" href="#cb33-7" tabindex="-1"></a><span class="st"> <collection /></span></span>
|
|
||||||
<span id="cb33-8"><a aria-hidden="true" href="#cb33-8" tabindex="-1"></a><span class="st"> <C:calendar /></span></span>
|
|
||||||
<span id="cb33-9"><a aria-hidden="true" href="#cb33-9" tabindex="-1"></a><span class="st"> </resourcetype></span></span>
|
|
||||||
<span id="cb33-10"><a aria-hidden="true" href="#cb33-10" tabindex="-1"></a><span class="st"> <C:supported-calendar-component-set></span></span>
|
|
||||||
<span id="cb33-11"><a aria-hidden="true" href="#cb33-11" tabindex="-1"></a><span class="st"> <C:comp name="VEVENT" /></span></span>
|
|
||||||
<span id="cb33-12"><a aria-hidden="true" href="#cb33-12" tabindex="-1"></a><span class="st"> <C:comp name="VJOURNAL" /></span></span>
|
|
||||||
<span id="cb33-13"><a aria-hidden="true" href="#cb33-13" tabindex="-1"></a><span class="st"> <C:comp name="VTODO" /></span></span>
|
|
||||||
<span id="cb33-14"><a aria-hidden="true" href="#cb33-14" tabindex="-1"></a><span class="st"> </C:supported-calendar-component-set></span></span>
|
|
||||||
<span id="cb33-15"><a aria-hidden="true" href="#cb33-15" tabindex="-1"></a><span class="st"> <displayname>Calendar</displayname></span></span>
|
|
||||||
<span id="cb33-16"><a aria-hidden="true" href="#cb33-16" tabindex="-1"></a><span class="st"> <C:calendar-description>Example calendar</C:calendar-description></span></span>
|
|
||||||
<span id="cb33-17"><a aria-hidden="true" href="#cb33-17" tabindex="-1"></a><span class="st"> <I:calendar-color>#ff0000ff</I:calendar-color></span></span>
|
|
||||||
<span id="cb33-18"><a aria-hidden="true" href="#cb33-18" tabindex="-1"></a><span class="st"> </prop></span></span>
|
|
||||||
<span id="cb33-19"><a aria-hidden="true" href="#cb33-19" tabindex="-1"></a><span class="st"> </set></span></span>
|
|
||||||
<span id="cb33-20"><a aria-hidden="true" href="#cb33-20" tabindex="-1"></a><span class="st"></create>'</span></span></code></pre></div>
|
|
||||||
<p>To create a new address book run something like:</p>
|
|
||||||
<div class="sourceCode" id="cb34"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb34-1"><a aria-hidden="true" href="#cb34-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> <span class="at">--data</span> <span class="dt">\</span></span>
|
|
||||||
<span id="cb34-2"><a aria-hidden="true" href="#cb34-2" tabindex="-1"></a><span class="st">'<?xml version="1.0" encoding="UTF-8" ?></span></span>
|
<span id="cb34-2"><a aria-hidden="true" href="#cb34-2" tabindex="-1"></a><span class="st">'<?xml version="1.0" encoding="UTF-8" ?></span></span>
|
||||||
<span id="cb34-3"><a aria-hidden="true" href="#cb34-3" tabindex="-1"></a><span class="st"><create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"></span></span>
|
<span id="cb34-3"><a aria-hidden="true" href="#cb34-3" tabindex="-1"></a><span class="st"><create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"></span></span>
|
||||||
<span id="cb34-4"><a aria-hidden="true" href="#cb34-4" tabindex="-1"></a><span class="st"> <set></span></span>
|
<span id="cb34-4"><a aria-hidden="true" href="#cb34-4" tabindex="-1"></a><span class="st"> <set></span></span>
|
||||||
<span id="cb34-5"><a aria-hidden="true" href="#cb34-5" tabindex="-1"></a><span class="st"> <prop></span></span>
|
<span id="cb34-5"><a aria-hidden="true" href="#cb34-5" tabindex="-1"></a><span class="st"> <prop></span></span>
|
||||||
<span id="cb34-6"><a aria-hidden="true" href="#cb34-6" tabindex="-1"></a><span class="st"> <resourcetype></span></span>
|
<span id="cb34-6"><a aria-hidden="true" href="#cb34-6" tabindex="-1"></a><span class="st"> <resourcetype></span></span>
|
||||||
<span id="cb34-7"><a aria-hidden="true" href="#cb34-7" tabindex="-1"></a><span class="st"> <collection /></span></span>
|
<span id="cb34-7"><a aria-hidden="true" href="#cb34-7" tabindex="-1"></a><span class="st"> <collection /></span></span>
|
||||||
<span id="cb34-8"><a aria-hidden="true" href="#cb34-8" tabindex="-1"></a><span class="st"> <CR:addressbook /></span></span>
|
<span id="cb34-8"><a aria-hidden="true" href="#cb34-8" tabindex="-1"></a><span class="st"> <C:calendar /></span></span>
|
||||||
<span id="cb34-9"><a aria-hidden="true" href="#cb34-9" tabindex="-1"></a><span class="st"> </resourcetype></span></span>
|
<span id="cb34-9"><a aria-hidden="true" href="#cb34-9" tabindex="-1"></a><span class="st"> </resourcetype></span></span>
|
||||||
<span id="cb34-10"><a aria-hidden="true" href="#cb34-10" tabindex="-1"></a><span class="st"> <displayname>Address book</displayname></span></span>
|
<span id="cb34-10"><a aria-hidden="true" href="#cb34-10" tabindex="-1"></a><span class="st"> <C:supported-calendar-component-set></span></span>
|
||||||
<span id="cb34-11"><a aria-hidden="true" href="#cb34-11" tabindex="-1"></a><span class="st"> <CR:addressbook-description>Example address book</CR:addressbook-description></span></span>
|
<span id="cb34-11"><a aria-hidden="true" href="#cb34-11" tabindex="-1"></a><span class="st"> <C:comp name="VEVENT" /></span></span>
|
||||||
<span id="cb34-12"><a aria-hidden="true" href="#cb34-12" tabindex="-1"></a><span class="st"> </prop></span></span>
|
<span id="cb34-12"><a aria-hidden="true" href="#cb34-12" tabindex="-1"></a><span class="st"> <C:comp name="VJOURNAL" /></span></span>
|
||||||
<span id="cb34-13"><a aria-hidden="true" href="#cb34-13" tabindex="-1"></a><span class="st"> </set></span></span>
|
<span id="cb34-13"><a aria-hidden="true" href="#cb34-13" tabindex="-1"></a><span class="st"> <C:comp name="VTODO" /></span></span>
|
||||||
<span id="cb34-14"><a aria-hidden="true" href="#cb34-14" tabindex="-1"></a><span class="st"></create>'</span></span></code></pre></div>
|
<span id="cb34-14"><a aria-hidden="true" href="#cb34-14" tabindex="-1"></a><span class="st"> </C:supported-calendar-component-set></span></span>
|
||||||
|
<span id="cb34-15"><a aria-hidden="true" href="#cb34-15" tabindex="-1"></a><span class="st"> <displayname>Calendar</displayname></span></span>
|
||||||
|
<span id="cb34-16"><a aria-hidden="true" href="#cb34-16" tabindex="-1"></a><span class="st"> <C:calendar-description>Example calendar</C:calendar-description></span></span>
|
||||||
|
<span id="cb34-17"><a aria-hidden="true" href="#cb34-17" tabindex="-1"></a><span class="st"> <I:calendar-color>#ff0000ff</I:calendar-color></span></span>
|
||||||
|
<span id="cb34-18"><a aria-hidden="true" href="#cb34-18" tabindex="-1"></a><span class="st"> </prop></span></span>
|
||||||
|
<span id="cb34-19"><a aria-hidden="true" href="#cb34-19" tabindex="-1"></a><span class="st"> </set></span></span>
|
||||||
|
<span id="cb34-20"><a aria-hidden="true" href="#cb34-20" tabindex="-1"></a><span class="st"></create>'</span></span></code></pre></div>
|
||||||
|
<p>To create a new address book run something like:</p>
|
||||||
|
<div class="sourceCode" id="cb35"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb35-1"><a aria-hidden="true" href="#cb35-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> <span class="at">--data</span> <span class="dt">\</span></span>
|
||||||
|
<span id="cb35-2"><a aria-hidden="true" href="#cb35-2" tabindex="-1"></a><span class="st">'<?xml version="1.0" encoding="UTF-8" ?></span></span>
|
||||||
|
<span id="cb35-3"><a aria-hidden="true" href="#cb35-3" tabindex="-1"></a><span class="st"><create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"></span></span>
|
||||||
|
<span id="cb35-4"><a aria-hidden="true" href="#cb35-4" tabindex="-1"></a><span class="st"> <set></span></span>
|
||||||
|
<span id="cb35-5"><a aria-hidden="true" href="#cb35-5" tabindex="-1"></a><span class="st"> <prop></span></span>
|
||||||
|
<span id="cb35-6"><a aria-hidden="true" href="#cb35-6" tabindex="-1"></a><span class="st"> <resourcetype></span></span>
|
||||||
|
<span id="cb35-7"><a aria-hidden="true" href="#cb35-7" tabindex="-1"></a><span class="st"> <collection /></span></span>
|
||||||
|
<span id="cb35-8"><a aria-hidden="true" href="#cb35-8" tabindex="-1"></a><span class="st"> <CR:addressbook /></span></span>
|
||||||
|
<span id="cb35-9"><a aria-hidden="true" href="#cb35-9" tabindex="-1"></a><span class="st"> </resourcetype></span></span>
|
||||||
|
<span id="cb35-10"><a aria-hidden="true" href="#cb35-10" tabindex="-1"></a><span class="st"> <displayname>Address book</displayname></span></span>
|
||||||
|
<span id="cb35-11"><a aria-hidden="true" href="#cb35-11" tabindex="-1"></a><span class="st"> <CR:addressbook-description>Example address book</CR:addressbook-description></span></span>
|
||||||
|
<span id="cb35-12"><a aria-hidden="true" href="#cb35-12" tabindex="-1"></a><span class="st"> </prop></span></span>
|
||||||
|
<span id="cb35-13"><a aria-hidden="true" href="#cb35-13" tabindex="-1"></a><span class="st"> </set></span></span>
|
||||||
|
<span id="cb35-14"><a aria-hidden="true" href="#cb35-14" tabindex="-1"></a><span class="st"></create>'</span></span></code></pre></div>
|
||||||
<p>The collection <code>/USERNAME</code> will be created automatically,
|
<p>The collection <code>/USERNAME</code> will be created automatically,
|
||||||
when the user authenticates to Radicale for the first time. Clients with
|
when the user authenticates to Radicale for the first time. Clients with
|
||||||
automatic discovery of collections will only show calendars and address
|
automatic discovery of collections will only show calendars and address
|
||||||
books that are direct children of the path <code>/USERNAME/</code>.</p>
|
books that are direct children of the path <code>/USERNAME/</code>.</p>
|
||||||
<p>Delete the collections by running something like:</p>
|
<p>Delete the collections by running something like:</p>
|
||||||
<div class="sourceCode" id="cb35"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb35-1"><a aria-hidden="true" href="#cb35-1" tabindex="-1"></a><span class="ex">curl</span> <span class="at">-u</span> user <span class="at">-X</span> DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div>
|
<div class="sourceCode" id="cb36"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb36-1"><a aria-hidden="true" href="#cb36-1" tabindex="-1"></a><span class="ex">curl</span> <span class="at">-u</span> user <span class="at">-X</span> DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="level3" id="authentication-and-rights">
|
<section class="level3" id="authentication-and-rights">
|
||||||
|
@ -1075,24 +1081,24 @@ to calendars and address books outside the home directory of users
|
||||||
collections and will not show them to the user. This is only useful if
|
collections and will not show them to the user. This is only useful if
|
||||||
you access calendars and address books directly via URL.</p>
|
you access calendars and address books directly via URL.</p>
|
||||||
<p>An example rights file:</p>
|
<p>An example rights file:</p>
|
||||||
<div class="sourceCode" id="cb36"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb36-1"><a aria-hidden="true" href="#cb36-1" tabindex="-1"></a><span class="co"># Allow reading root collection for authenticated users</span></span>
|
<div class="sourceCode" id="cb37"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb37-1"><a aria-hidden="true" href="#cb37-1" tabindex="-1"></a><span class="co"># Allow reading root collection for authenticated users</span></span>
|
||||||
<span id="cb36-2"><a aria-hidden="true" href="#cb36-2" tabindex="-1"></a><span class="kw">[root]</span></span>
|
<span id="cb37-2"><a aria-hidden="true" href="#cb37-2" tabindex="-1"></a><span class="kw">[root]</span></span>
|
||||||
<span id="cb36-3"><a aria-hidden="true" href="#cb36-3" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
<span id="cb37-3"><a aria-hidden="true" href="#cb37-3" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
||||||
<span id="cb36-4"><a aria-hidden="true" href="#cb36-4" tabindex="-1"></a><span class="dt">collection:</span></span>
|
<span id="cb37-4"><a aria-hidden="true" href="#cb37-4" tabindex="-1"></a><span class="dt">collection:</span></span>
|
||||||
<span id="cb36-5"><a aria-hidden="true" href="#cb36-5" tabindex="-1"></a><span class="dt">permissions: R</span></span>
|
<span id="cb37-5"><a aria-hidden="true" href="#cb37-5" tabindex="-1"></a><span class="dt">permissions: R</span></span>
|
||||||
<span id="cb36-6"><a aria-hidden="true" href="#cb36-6" tabindex="-1"></a></span>
|
<span id="cb37-6"><a aria-hidden="true" href="#cb37-6" tabindex="-1"></a></span>
|
||||||
<span id="cb36-7"><a aria-hidden="true" href="#cb36-7" tabindex="-1"></a><span class="co"># Allow reading and writing principal collection (same as username)</span></span>
|
<span id="cb37-7"><a aria-hidden="true" href="#cb37-7" tabindex="-1"></a><span class="co"># Allow reading and writing principal collection (same as username)</span></span>
|
||||||
<span id="cb36-8"><a aria-hidden="true" href="#cb36-8" tabindex="-1"></a><span class="kw">[principal]</span></span>
|
<span id="cb37-8"><a aria-hidden="true" href="#cb37-8" tabindex="-1"></a><span class="kw">[principal]</span></span>
|
||||||
<span id="cb36-9"><a aria-hidden="true" href="#cb36-9" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
<span id="cb37-9"><a aria-hidden="true" href="#cb37-9" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
||||||
<span id="cb36-10"><a aria-hidden="true" href="#cb36-10" tabindex="-1"></a><span class="dt">collection: {user}</span></span>
|
<span id="cb37-10"><a aria-hidden="true" href="#cb37-10" tabindex="-1"></a><span class="dt">collection: {user}</span></span>
|
||||||
<span id="cb36-11"><a aria-hidden="true" href="#cb36-11" tabindex="-1"></a><span class="dt">permissions: RW</span></span>
|
<span id="cb37-11"><a aria-hidden="true" href="#cb37-11" tabindex="-1"></a><span class="dt">permissions: RW</span></span>
|
||||||
<span id="cb36-12"><a aria-hidden="true" href="#cb36-12" tabindex="-1"></a></span>
|
<span id="cb37-12"><a aria-hidden="true" href="#cb37-12" tabindex="-1"></a></span>
|
||||||
<span id="cb36-13"><a aria-hidden="true" href="#cb36-13" tabindex="-1"></a><span class="co"># Allow reading and writing calendars and address books that are direct</span></span>
|
<span id="cb37-13"><a aria-hidden="true" href="#cb37-13" tabindex="-1"></a><span class="co"># Allow reading and writing calendars and address books that are direct</span></span>
|
||||||
<span id="cb36-14"><a aria-hidden="true" href="#cb36-14" tabindex="-1"></a><span class="co"># children of the principal collection</span></span>
|
<span id="cb37-14"><a aria-hidden="true" href="#cb37-14" tabindex="-1"></a><span class="co"># children of the principal collection</span></span>
|
||||||
<span id="cb36-15"><a aria-hidden="true" href="#cb36-15" tabindex="-1"></a><span class="kw">[calendars]</span></span>
|
<span id="cb37-15"><a aria-hidden="true" href="#cb37-15" tabindex="-1"></a><span class="kw">[calendars]</span></span>
|
||||||
<span id="cb36-16"><a aria-hidden="true" href="#cb36-16" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
<span id="cb37-16"><a aria-hidden="true" href="#cb37-16" tabindex="-1"></a><span class="dt">user: .+</span></span>
|
||||||
<span id="cb36-17"><a aria-hidden="true" href="#cb36-17" tabindex="-1"></a><span class="dt">collection: {user}/</span><span class="kw">[^/]</span><span class="dt">+</span></span>
|
<span id="cb37-17"><a aria-hidden="true" href="#cb37-17" tabindex="-1"></a><span class="dt">collection: {user}/</span><span class="kw">[^/]</span><span class="dt">+</span></span>
|
||||||
<span id="cb36-18"><a aria-hidden="true" href="#cb36-18" tabindex="-1"></a><span class="dt">permissions: rw</span></span></code></pre></div>
|
<span id="cb37-18"><a aria-hidden="true" href="#cb37-18" tabindex="-1"></a><span class="dt">permissions: rw</span></span></code></pre></div>
|
||||||
<p>The titles of the sections are ignored (but must be unique). The keys
|
<p>The titles of the sections are ignored (but must be unique). The keys
|
||||||
<code>user</code> and <code>collection</code> contain regular
|
<code>user</code> and <code>collection</code> contain regular
|
||||||
expressions, that are matched against the username and the path of the
|
expressions, that are matched against the username and the path of the
|
||||||
|
@ -1171,10 +1177,10 @@ system. The storage is locked with exclusive access while the
|
||||||
<h5>Linux shell scripts <a class="headerlink" href="#linux-shell-scripts">¶</a></h5>
|
<h5>Linux shell scripts <a class="headerlink" href="#linux-shell-scripts">¶</a></h5>
|
||||||
<p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a>
|
<p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a>
|
||||||
utility.</p>
|
utility.</p>
|
||||||
<div class="sourceCode" id="cb37"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb37-1"><a aria-hidden="true" href="#cb37-1" tabindex="-1"></a><span class="co"># Exclusive</span></span>
|
<div class="sourceCode" id="cb38"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb38-1"><a aria-hidden="true" href="#cb38-1" tabindex="-1"></a><span class="co"># Exclusive</span></span>
|
||||||
<span id="cb37-2"><a aria-hidden="true" href="#cb37-2" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--exclusive</span> /path/to/storage/.Radicale.lock COMMAND</span>
|
<span id="cb38-2"><a aria-hidden="true" href="#cb38-2" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--exclusive</span> /path/to/storage/.Radicale.lock COMMAND</span>
|
||||||
<span id="cb37-3"><a aria-hidden="true" href="#cb37-3" tabindex="-1"></a><span class="co"># Shared</span></span>
|
<span id="cb38-3"><a aria-hidden="true" href="#cb38-3" tabindex="-1"></a><span class="co"># Shared</span></span>
|
||||||
<span id="cb37-4"><a aria-hidden="true" href="#cb37-4" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--shared</span> /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div>
|
<span id="cb38-4"><a aria-hidden="true" href="#cb38-4" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--shared</span> /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div>
|
||||||
</section>
|
</section>
|
||||||
<section class="level5" id="linux-and-macos">
|
<section class="level5" id="linux-and-macos">
|
||||||
<h5>Linux and MacOS <a class="headerlink" href="#linux-and-macos">¶</a></h5>
|
<h5>Linux and MacOS <a class="headerlink" href="#linux-and-macos">¶</a></h5>
|
||||||
|
@ -1199,11 +1205,11 @@ folder in the file system storage (e.g.
|
||||||
clients that the collection is a calendar, you have to create the file
|
clients that the collection is a calendar, you have to create the file
|
||||||
<code>.Radicale.props</code> with the following content in the
|
<code>.Radicale.props</code> with the following content in the
|
||||||
folder:</p>
|
folder:</p>
|
||||||
<div class="sourceCode" id="cb38"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb38-1"><a aria-hidden="true" href="#cb38-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div>
|
<div class="sourceCode" id="cb39"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb39-1"><a aria-hidden="true" href="#cb39-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div>
|
||||||
<p>The calendar is now available at the URL path
|
<p>The calendar is now available at the URL path
|
||||||
<code>/user/calendar</code>. For address books the file must
|
<code>/user/calendar</code>. For address books the file must
|
||||||
contain:</p>
|
contain:</p>
|
||||||
<div class="sourceCode" id="cb39"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb39-1"><a aria-hidden="true" href="#cb39-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div>
|
<div class="sourceCode" id="cb40"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb40-1"><a aria-hidden="true" href="#cb40-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div>
|
||||||
<p>Calendar and address book collections must not have any child
|
<p>Calendar and address book collections must not have any child
|
||||||
collections. Clients with automatic discovery of collections will only
|
collections. Clients with automatic discovery of collections will only
|
||||||
show calendars and address books that are direct children of the path
|
show calendars and address books that are direct children of the path
|
||||||
|
@ -1334,49 +1340,49 @@ password.</p>
|
||||||
modules is <a href="https://docs.python.org/3/distutils/setupscript.html">Distutils</a>.
|
modules is <a href="https://docs.python.org/3/distutils/setupscript.html">Distutils</a>.
|
||||||
For a minimal setup create the file <code>setup.py</code> with the
|
For a minimal setup create the file <code>setup.py</code> with the
|
||||||
following content in an empty folder:</p>
|
following content in an empty folder:</p>
|
||||||
<div class="sourceCode" id="cb40"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb40-1"><a aria-hidden="true" href="#cb40-1" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
|
<div class="sourceCode" id="cb41"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb41-1"><a aria-hidden="true" href="#cb41-1" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
|
||||||
<span id="cb40-2"><a aria-hidden="true" href="#cb40-2" tabindex="-1"></a></span>
|
<span id="cb41-2"><a aria-hidden="true" href="#cb41-2" tabindex="-1"></a></span>
|
||||||
<span id="cb40-3"><a aria-hidden="true" href="#cb40-3" tabindex="-1"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span>
|
<span id="cb41-3"><a aria-hidden="true" href="#cb41-3" tabindex="-1"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span>
|
||||||
<span id="cb40-4"><a aria-hidden="true" href="#cb40-4" tabindex="-1"></a></span>
|
<span id="cb41-4"><a aria-hidden="true" href="#cb41-4" tabindex="-1"></a></span>
|
||||||
<span id="cb40-5"><a aria-hidden="true" href="#cb40-5" tabindex="-1"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>,</span>
|
<span id="cb41-5"><a aria-hidden="true" href="#cb41-5" tabindex="-1"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>,</span>
|
||||||
<span id="cb40-6"><a aria-hidden="true" href="#cb40-6" tabindex="-1"></a> packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div>
|
<span id="cb41-6"><a aria-hidden="true" href="#cb41-6" tabindex="-1"></a> packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div>
|
||||||
<p>In the same folder create the sub-folder
|
<p>In the same folder create the sub-folder
|
||||||
<code>radicale_static_password_auth</code>. The folder must have the
|
<code>radicale_static_password_auth</code>. The folder must have the
|
||||||
same name as specified in <code>packages</code> above.</p>
|
same name as specified in <code>packages</code> above.</p>
|
||||||
<p>Create the file <code>__init__.py</code> in the
|
<p>Create the file <code>__init__.py</code> in the
|
||||||
<code>radicale_static_password_auth</code> folder with the following
|
<code>radicale_static_password_auth</code> folder with the following
|
||||||
content:</p>
|
content:</p>
|
||||||
<div class="sourceCode" id="cb41"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb41-1"><a aria-hidden="true" href="#cb41-1" tabindex="-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span>
|
<div class="sourceCode" id="cb42"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb42-1"><a aria-hidden="true" href="#cb42-1" tabindex="-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span>
|
||||||
<span id="cb41-2"><a aria-hidden="true" href="#cb41-2" tabindex="-1"></a><span class="im">from</span> radicale.log <span class="im">import</span> logger</span>
|
<span id="cb42-2"><a aria-hidden="true" href="#cb42-2" tabindex="-1"></a><span class="im">from</span> radicale.log <span class="im">import</span> logger</span>
|
||||||
<span id="cb41-3"><a aria-hidden="true" href="#cb41-3" tabindex="-1"></a></span>
|
<span id="cb42-3"><a aria-hidden="true" href="#cb42-3" tabindex="-1"></a></span>
|
||||||
<span id="cb41-4"><a aria-hidden="true" href="#cb41-4" tabindex="-1"></a>PLUGIN_CONFIG_SCHEMA <span class="op">=</span> {<span class="st">"auth"</span>: {</span>
|
<span id="cb42-4"><a aria-hidden="true" href="#cb42-4" tabindex="-1"></a>PLUGIN_CONFIG_SCHEMA <span class="op">=</span> {<span class="st">"auth"</span>: {</span>
|
||||||
<span id="cb41-5"><a aria-hidden="true" href="#cb41-5" tabindex="-1"></a> <span class="st">"password"</span>: {<span class="st">"value"</span>: <span class="st">""</span>, <span class="st">"type"</span>: <span class="bu">str</span>}}}</span>
|
<span id="cb42-5"><a aria-hidden="true" href="#cb42-5" tabindex="-1"></a> <span class="st">"password"</span>: {<span class="st">"value"</span>: <span class="st">""</span>, <span class="st">"type"</span>: <span class="bu">str</span>}}}</span>
|
||||||
<span id="cb41-6"><a aria-hidden="true" href="#cb41-6" tabindex="-1"></a></span>
|
<span id="cb42-6"><a aria-hidden="true" href="#cb42-6" tabindex="-1"></a></span>
|
||||||
<span id="cb41-7"><a aria-hidden="true" href="#cb41-7" tabindex="-1"></a></span>
|
<span id="cb42-7"><a aria-hidden="true" href="#cb42-7" tabindex="-1"></a></span>
|
||||||
<span id="cb41-8"><a aria-hidden="true" href="#cb41-8" tabindex="-1"></a><span class="kw">class</span> Auth(BaseAuth):</span>
|
<span id="cb42-8"><a aria-hidden="true" href="#cb42-8" tabindex="-1"></a><span class="kw">class</span> Auth(BaseAuth):</span>
|
||||||
<span id="cb41-9"><a aria-hidden="true" href="#cb41-9" tabindex="-1"></a> <span class="kw">def</span> <span class="fu">__init__</span>(<span class="va">self</span>, configuration):</span>
|
<span id="cb42-9"><a aria-hidden="true" href="#cb42-9" tabindex="-1"></a> <span class="kw">def</span> <span class="fu">__init__</span>(<span class="va">self</span>, configuration):</span>
|
||||||
<span id="cb41-10"><a aria-hidden="true" href="#cb41-10" tabindex="-1"></a> <span class="bu">super</span>().<span class="fu">__init__</span>(configuration.copy(PLUGIN_CONFIG_SCHEMA))</span>
|
<span id="cb42-10"><a aria-hidden="true" href="#cb42-10" tabindex="-1"></a> <span class="bu">super</span>().<span class="fu">__init__</span>(configuration.copy(PLUGIN_CONFIG_SCHEMA))</span>
|
||||||
<span id="cb41-11"><a aria-hidden="true" href="#cb41-11" tabindex="-1"></a></span>
|
<span id="cb42-11"><a aria-hidden="true" href="#cb42-11" tabindex="-1"></a></span>
|
||||||
<span id="cb41-12"><a aria-hidden="true" href="#cb41-12" tabindex="-1"></a> <span class="kw">def</span> login(<span class="va">self</span>, login, password):</span>
|
<span id="cb42-12"><a aria-hidden="true" href="#cb42-12" tabindex="-1"></a> <span class="kw">def</span> login(<span class="va">self</span>, login, password):</span>
|
||||||
<span id="cb41-13"><a aria-hidden="true" href="#cb41-13" tabindex="-1"></a> <span class="co"># Get password from configuration option</span></span>
|
<span id="cb42-13"><a aria-hidden="true" href="#cb42-13" tabindex="-1"></a> <span class="co"># Get password from configuration option</span></span>
|
||||||
<span id="cb41-14"><a aria-hidden="true" href="#cb41-14" tabindex="-1"></a> static_password <span class="op">=</span> <span class="va">self</span>.configuration.get(<span class="st">"auth"</span>, <span class="st">"password"</span>)</span>
|
<span id="cb42-14"><a aria-hidden="true" href="#cb42-14" tabindex="-1"></a> static_password <span class="op">=</span> <span class="va">self</span>.configuration.get(<span class="st">"auth"</span>, <span class="st">"password"</span>)</span>
|
||||||
<span id="cb41-15"><a aria-hidden="true" href="#cb41-15" tabindex="-1"></a> <span class="co"># Check authentication</span></span>
|
<span id="cb42-15"><a aria-hidden="true" href="#cb42-15" tabindex="-1"></a> <span class="co"># Check authentication</span></span>
|
||||||
<span id="cb41-16"><a aria-hidden="true" href="#cb41-16" tabindex="-1"></a> logger.info(<span class="st">"Login attempt by </span><span class="sc">%r</span><span class="st"> with password </span><span class="sc">%r</span><span class="st">"</span>,</span>
|
<span id="cb42-16"><a aria-hidden="true" href="#cb42-16" tabindex="-1"></a> logger.info(<span class="st">"Login attempt by </span><span class="sc">%r</span><span class="st"> with password </span><span class="sc">%r</span><span class="st">"</span>,</span>
|
||||||
<span id="cb41-17"><a aria-hidden="true" href="#cb41-17" tabindex="-1"></a> login, password)</span>
|
<span id="cb42-17"><a aria-hidden="true" href="#cb42-17" tabindex="-1"></a> login, password)</span>
|
||||||
<span id="cb41-18"><a aria-hidden="true" href="#cb41-18" tabindex="-1"></a> <span class="cf">if</span> password <span class="op">==</span> static_password:</span>
|
<span id="cb42-18"><a aria-hidden="true" href="#cb42-18" tabindex="-1"></a> <span class="cf">if</span> password <span class="op">==</span> static_password:</span>
|
||||||
<span id="cb41-19"><a aria-hidden="true" href="#cb41-19" tabindex="-1"></a> <span class="cf">return</span> login</span>
|
<span id="cb42-19"><a aria-hidden="true" href="#cb42-19" tabindex="-1"></a> <span class="cf">return</span> login</span>
|
||||||
<span id="cb41-20"><a aria-hidden="true" href="#cb41-20" tabindex="-1"></a> <span class="cf">return</span> <span class="st">""</span></span></code></pre></div>
|
<span id="cb42-20"><a aria-hidden="true" href="#cb42-20" tabindex="-1"></a> <span class="cf">return</span> <span class="st">""</span></span></code></pre></div>
|
||||||
<p>Install the python module by running the following command in the
|
<p>Install the python module by running the following command in the
|
||||||
same folder as <code>setup.py</code>:</p>
|
same folder as <code>setup.py</code>:</p>
|
||||||
<div class="sourceCode" id="cb42"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb42-1"><a aria-hidden="true" href="#cb42-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install .</span></code></pre></div>
|
<div class="sourceCode" id="cb43"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb43-1"><a aria-hidden="true" href="#cb43-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install .</span></code></pre></div>
|
||||||
<p>To make use this great creation in Radicale, set the configuration
|
<p>To make use this great creation in Radicale, set the configuration
|
||||||
option <code>type</code> in the <code>auth</code> section to
|
option <code>type</code> in the <code>auth</code> section to
|
||||||
<code>radicale_static_password_auth</code>:</p>
|
<code>radicale_static_password_auth</code>:</p>
|
||||||
<div class="sourceCode" id="cb43"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb43-1"><a aria-hidden="true" href="#cb43-1" tabindex="-1"></a><span class="kw">[auth]</span></span>
|
<div class="sourceCode" id="cb44"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb44-1"><a aria-hidden="true" href="#cb44-1" tabindex="-1"></a><span class="kw">[auth]</span></span>
|
||||||
<span id="cb43-2"><a aria-hidden="true" href="#cb43-2" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> radicale_static_password_auth</span></span>
|
<span id="cb44-2"><a aria-hidden="true" href="#cb44-2" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> radicale_static_password_auth</span></span>
|
||||||
<span id="cb43-3"><a aria-hidden="true" href="#cb43-3" tabindex="-1"></a><span class="dt">password </span><span class="ot">=</span><span class="st"> secret</span></span></code></pre></div>
|
<span id="cb44-3"><a aria-hidden="true" href="#cb44-3" tabindex="-1"></a><span class="dt">password </span><span class="ot">=</span><span class="st"> secret</span></span></code></pre></div>
|
||||||
<p>You can uninstall the module with:</p>
|
<p>You can uninstall the module with:</p>
|
||||||
<div class="sourceCode" id="cb44"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb44-1"><a aria-hidden="true" href="#cb44-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip uninstall radicale_static_password_auth</span></code></pre></div>
|
<div class="sourceCode" id="cb45"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb45-1"><a aria-hidden="true" href="#cb45-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip uninstall radicale_static_password_auth</span></code></pre></div>
|
||||||
</section>
|
</section>
|
||||||
<section class="level4" id="authentication-plugins">
|
<section class="level4" id="authentication-plugins">
|
||||||
<h4>Authentication plugins <a class="headerlink" href="#authentication-plugins">¶</a></h4>
|
<h4>Authentication plugins <a class="headerlink" href="#authentication-plugins">¶</a></h4>
|
||||||
|
@ -1440,14 +1446,14 @@ you want to add new features, fix bugs or update the documentation.</p>
|
||||||
<h4>PyPI <a class="headerlink" href="#pypi">¶</a></h4>
|
<h4>PyPI <a class="headerlink" href="#pypi">¶</a></h4>
|
||||||
<p>Radicale is <a href="https://pypi.python.org/pypi/Radicale/">available on PyPI</a>. To
|
<p>Radicale is <a href="https://pypi.python.org/pypi/Radicale/">available on PyPI</a>. To
|
||||||
install, just type as superuser:</p>
|
install, just type as superuser:</p>
|
||||||
<div class="sourceCode" id="cb45"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb45-1"><a aria-hidden="true" href="#cb45-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> radicale</span></code></pre></div>
|
<div class="sourceCode" id="cb46"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb46-1"><a aria-hidden="true" href="#cb46-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> radicale</span></code></pre></div>
|
||||||
</section>
|
</section>
|
||||||
<section class="level4" id="git-repository">
|
<section class="level4" id="git-repository">
|
||||||
<h4>Git Repository <a class="headerlink" href="#git-repository">¶</a></h4>
|
<h4>Git Repository <a class="headerlink" href="#git-repository">¶</a></h4>
|
||||||
<p>If you want the development version of Radicale, take a look at the
|
<p>If you want the development version of Radicale, take a look at the
|
||||||
<a href="https://github.com/Kozea/Radicale/">git repository on
|
<a href="https://github.com/Kozea/Radicale/">git repository on
|
||||||
GitHub</a>, or install it directly with:</p>
|
GitHub</a>, or install it directly with:</p>
|
||||||
<div class="sourceCode" id="cb46"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb46-1"><a aria-hidden="true" href="#cb46-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> https://github.com/Kozea/Radicale/archive/master.tar.gz</span></code></pre></div>
|
<div class="sourceCode" id="cb47"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb47-1"><a aria-hidden="true" href="#cb47-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> https://github.com/Kozea/Radicale/archive/master.tar.gz</span></code></pre></div>
|
||||||
<p>You can also download the content of the repository as an <a href="https://github.com/Kozea/Radicale/tarball/master">archive</a>.</p>
|
<p>You can also download the content of the repository as an <a href="https://github.com/Kozea/Radicale/tarball/master">archive</a>.</p>
|
||||||
</section>
|
</section>
|
||||||
<section class="level4" id="source-packages">
|
<section class="level4" id="source-packages">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue