remove stale $Id$
[irspy-moved-to-github.git] / web / htdocs / offtopic / sru-auth.html
1 <%doc>
2         In order to test the authentication feature of Simple2ZOOM, we
3         need an authenticator script, accessible via HTTP.  The
4         simplest way to provide that is as a simple bit of HTML::Mason
5         running under the conveniently available IRSpy distribution.
6         Since this is only for testing, a hardwired user register is
7         good enough.
8 </%doc>
9 <%args>
10 $user => undef
11 $pass => undef
12 </%args>
13 <%once>
14 our %register = (
15     mike => "fish",
16     simon => "frog 123",
17     admin => "Tom&jErry",
18 );
19 </%once>
20 <%perl>
21 if (defined $user && defined $pass && $register{$user} eq $pass) {
22     print "OK\n";
23     return;
24 } else {
25     $m->clear_buffer;
26     $m->abort(401); # "Authorization Required"
27 }
28 </%perl>