From ac5a0886bbf031424fbbf71b4fed87f48569aebe Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 21 Aug 2007 09:48:41 +0000 Subject: [PATCH] New --- web/htdocs/offtopic/sru-auth.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 web/htdocs/offtopic/sru-auth.html 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" +} + -- 1.7.10.4