From 20824484792f5307a1bf18b20bf59af6dfe9ec71 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Tue, 24 May 2011 17:15:25 -0400 Subject: [PATCH] remove redundant test authentication plugin; add new dummy username to test plugin --- conf/plugins/TestAuthenticator.pm | 8 ++++++-- conf/plugins/TestAuthorizer.pm | 17 ----------------- 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 conf/plugins/TestAuthorizer.pm diff --git a/conf/plugins/TestAuthenticator.pm b/conf/plugins/TestAuthenticator.pm index d7d5850bd..fc86a141a 100644 --- a/conf/plugins/TestAuthenticator.pm +++ b/conf/plugins/TestAuthenticator.pm @@ -6,8 +6,12 @@ use base 'Bio::Graphics::Browser2::Plugin::AuthPlugin'; sub authenticate { my $self = shift; my ($name,$password) = $self->credentials; - return unless $name eq 'lincoln' && $password eq 'foobar'; - return ($name,'Lincoln Stein'); # username, fullname + if ($name eq 'lincoln' && $password eq 'foobar') { + return ($name,'Lincoln Stein'); # username, fullname + } elsif ($name eq 'jane' && $password eq 'foobar') { + return ($name,'Jane Doe'); + } + return; } diff --git a/conf/plugins/TestAuthorizer.pm b/conf/plugins/TestAuthorizer.pm deleted file mode 100644 index 260436648..000000000 --- a/conf/plugins/TestAuthorizer.pm +++ /dev/null @@ -1,17 +0,0 @@ -package Bio::Graphics::Browser2::Plugin::TestAuthorizer; -# $Id$ -use strict; -use base 'Bio::Graphics::Browser2::Plugin::AuthPlugin'; - -sub authenticate { - my $self = shift; - my ($name,$password) = $self->credentials; - warn "credentials = ('$name','$password')"; - return unless $name eq 'lincoln' && $password eq 'foobar'; - return ($name,'Lincoln Stein'); # username, fullname -} - - -1; - -__END__