dirplex: Fixed dotfile-checking typo.
[ashd.git] / doc / htextauth.doc
CommitLineData
d185ffb9
FT
1htextauth(1)
2============
3
4NAME
5----
6htextauth - HTTP Basic authenticator for ashd(7)
7
8SYNOPSIS
9--------
10*htextauth* [*-hCs*] [*-r* 'REALM'] 'AUTHCMD' ['ARGS'...] `--` 'CHILD' ['ARGS'...]
11
12DESCRIPTION
13-----------
14
15The *htextauth* handler starts a single child handler which it passes
16all requests it receives, assuming they pass an authentication
17test. *htextauth* will request HTTP Basic credentials from the client,
18and pass such credentials to an external program in order to verify
19them. The authentication program will be called every time a new user
20needs to be authenticated. See the AUTHENTICATION section, below, for
21the calling convention used for the authentication program.
22
23*htextauth* is a persistent handler, as defined in *ashd*(7), and the
24specified child handler must also be a persistent handler.
25
26By default, *htextauth* will cache successfully verified credentials,
27so that the authentication program does not have to be called for each
28and every request. Cached credentials are cleared from the cache when
29they have not been used for over 30 minutes.
30
31If the child handler exits, *htextauth* exits as well.
32
33OPTIONS
34-------
35
36*-h*::
37
38 Print a brief help message to standard output and exit.
39
40*-C*::
41
42 Do not cache credentials.
43
44*-s*::
45
46 Require that all requests are made over HTTPS.
47
48*-r* 'REALM'::
49
50 Specify 'REALM' as the authentication realm when requesting
51 credentials from the client.
52
53AUTHENTICATION
54--------------
55
56When a previously unseen user needs to be authenticated, *htextauth*
57will fork and execute the 'AUTHCMD' program, with any arguments that
58follow. *htextauth* will pass two lines of text to the authentication
59program's standard input: the given user name on the first line, and
60the password on the second. The credentials are checked in advance so
61that they do not contain any control characters (below ASCII 32).
62
63If the authentication program successfully verifies the credentials
64and wishes to grant access to the client, it needs to exit
65successfully; that is, with exit status 0. Any other exit (including
66being killed by a signal) is taken by *htextauth* as a failure.
67
68The authentication program can specify a reason for any failure by
69writing such on standard output. If the program exits unsuccessfully,
70*htextauth* will include any such message in the error page sent to
71the client.
72
73Note that *htextauth* will wait for the authentication program to exit
74and not process any other requests until then.
75
76AUTHOR
77------
78Fredrik Tolf <fredrik@dolda2000.com>
79
80SEE ALSO
81--------
d3ef283f 82*ashd*(7), RFC 2617