1 [[!template id=plugin name=httpauth author="Alec Berryman"]]
4 This plugin allows HTTP basic authentication to be used to log into the
5 wiki. In this mode, the web browser authenticates the user by some means,
6 and sets the `REMOTE_USER CGI` environment variable. This plugin trusts
7 that if that variable is set, the user is authenticated.
9 ## fully authenticated wiki
11 One way to use the plugin is to configure your web server to require
12 HTTP basic authentication for any access to the directory containing the
13 wiki (and `ikiwiki.cgi`). The authenticated user will be automatically
14 signed into the wiki. This method is suitable only for private wikis.
16 ## separate cgiauthurl
18 To use httpauth for a wiki where the content is public, and where
19 the `ikiwiki.cgi` needs to be usable without authentication (for searching,
20 or logging in using other methods, and so on), you can configure a separate
21 url that is used for authentication, via the `cgiauthurl` option in the setup
22 file. This url will then be redirected to when a user chooses to log in using
25 A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi`
26 into it. Then configure the web server to require authentication only for
27 access to the `auth` subdirectory. Then `cgiauthurl` is pointed at this
30 ## using only httpauth for some pages
32 If you want to only use httpauth for editing some pages, while allowing
33 other authentication methods to be used for other pages, you can
34 configure `httpauth_pagespec` in the setup file. This makes Edit
35 links on pages that match the [[ikiwiki/PageSpec]] automatically use
36 the `cgiauthurl`, and prevents matching pages from being edited by
37 users authentication via other methods.