projects
/
ikiwiki
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
implemented form state saving and retrieval
[ikiwiki]
/
IkiWiki
/
Plugin
/
httpauth.pm
1
#!/usr/bin/perl
2
# HTTP basic auth plugin.
3
package IkiWiki::Plugin::httpauth;
4
5
use warnings;
6
use strict;
7
use IkiWiki 2.00;
8
9
sub import { #{{{
10
hook(type => "auth", id => "httpauth", call => \&auth);
11
} # }}}
12
13
sub auth ($$) { #{{{
14
my $cgi=shift;
15
my $session=shift;
16
17
if (defined $cgi->remote_user()) {
18
$session->param("name", $cgi->remote_user());
19
}
20
} #}}}
21
22
1