2 # HTTP basic auth plugin.
3 package IkiWiki::Plugin::httpauth;
10 hook(type => "getsetup", id => "httpauth", call => \&getsetup);
11 hook(type => "auth", id => "httpauth", call => \&auth);
22 example => "ttp://example.com/wiki/auth/ikiwiki.cgi",
23 description => "url to redirect to when authentication is needed",
33 if (defined $cgi->remote_user()) {
34 $session->param("name", $cgi->remote_user());
36 elsif (defined $config{cgiauthurl}) {
37 IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string());