Permalink
Browse files

remove redundant test authentication plugin; add new dummy username t…

…o test plugin
  • Loading branch information...
1 parent 2d430c4 commit 20824484792f5307a1bf18b20bf59af6dfe9ec71 @lstein lstein committed May 24, 2011
Showing with 6 additions and 19 deletions.
  1. +6 −2 conf/plugins/TestAuthenticator.pm
  2. +0 −17 conf/plugins/TestAuthorizer.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;
}
@@ -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__

0 comments on commit 2082448

Please sign in to comment.