New
authorMike Taylor <mike@indexdata.com>
Tue, 21 Aug 2007 09:48:41 +0000 (09:48 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 21 Aug 2007 09:48:41 +0000 (09:48 +0000)
web/htdocs/offtopic/sru-auth.html [new file with mode: 0644]

diff --git a/web/htdocs/offtopic/sru-auth.html b/web/htdocs/offtopic/sru-auth.html
new file mode 100644 (file)
index 0000000..ed911c2
--- /dev/null
@@ -0,0 +1,29 @@
+%# $Id: sru-auth.html,v 1.1 2007-08-21 09:48:41 mike Exp $
+<%doc>
+       In order to test the authentication feature of Simple2ZOOM, we
+       need an authenticator script, accessible via HTTP.  The
+       simplest way to provide that is as a simple bit of HTML::Mason
+       running under the conveniently available IRSpy distribution.
+       Since this is only for testing, a hardwired user register is
+       good enough.
+</%doc>
+<%args>
+$user => undef
+$pass => undef
+</%args>
+<%once>
+our %register = (
+    mike => "fish",
+    simon => "frog 123",
+    admin => "Tom&jErry",
+);
+</%once>
+<%perl>
+if (defined $user && defined $pass && $register{$user} eq $pass) {
+    print "OK\n";
+    return;
+} else {
+    $m->clear_buffer;
+    $m->abort(401); # "Authorization Required"
+}
+</%perl>