From: Mike Taylor Date: Tue, 21 Aug 2007 09:48:41 +0000 (+0000) Subject: New X-Git-Tag: CPAN-v1.02~350 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=371ee77812670962a721d9ed9c0275a6dc18c712 New --- diff --git a/web/htdocs/offtopic/sru-auth.html b/web/htdocs/offtopic/sru-auth.html new file mode 100644 index 0000000..ed911c2 --- /dev/null +++ b/web/htdocs/offtopic/sru-auth.html @@ -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. + +<%args> +$user => undef +$pass => undef + +<%once> +our %register = ( + mike => "fish", + simon => "frog 123", + admin => "Tom&jErry", +); + +<%perl> +if (defined $user && defined $pass && $register{$user} eq $pass) { + print "OK\n"; + return; +} else { + $m->clear_buffer; + $m->abort(401); # "Authorization Required" +} +