]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/httpauth.pm
standardising and documenting getsetup
[git.ikiwiki.info.git] / IkiWiki / Plugin / httpauth.pm
1 #!/usr/bin/perl
2 # HTTP basic auth plugin.
3 package IkiWiki::Plugin::httpauth;
5 use warnings;
6 use strict;
7 use IkiWiki 2.00;
9 sub import { #{{{
10         hook(type => "auth", id => "httpauth", call => \&auth);
11 } # }}}
13 sub auth ($$) { #{{{
14         my $cgi=shift;
15         my $session=shift;
17         if (defined $cgi->remote_user()) {
18                 $session->param("name", $cgi->remote_user());
19         }
20 } #}}}
22 1