<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# HTTP basic auth plugin.
package IkiWiki::Plugin::httpauth;

use warnings;
use strict;
use IkiWiki 2.00;

sub import { #{{{
	hook(type =&gt; "auth", id =&gt; "httpauth", call =&gt; \&amp;auth);
} # }}}

sub auth ($$) { #{{{
	my $cgi=shift;
	my $session=shift;

	if (defined $cgi-&gt;remote_user()) {
		$session-&gt;param("name", $cgi-&gt;remote_user());
	}
} #}}}

1
</pre></body></html>