| 1 | package Bio::Graphics::Browser2::Plugin::TestAuthenticator; | ||
| 2 | # $Id$ | ||
| 3 | use strict; | ||
| 4 | use base 'Bio::Graphics::Browser2::Plugin::AuthPlugin'; | ||
| 5 | |||
| 6 | sub authenticate { | ||
| 7 | my $self = shift; | ||
| 8 | my ($name,$password) = $self->credentials; | ||
| 9 | if ($name eq 'lincoln' && $password eq 'foobar') { | ||
| 10 | return ($name,'Lincoln Stein'); # username, fullname | ||
| 11 | } elsif ($name eq 'jane' && $password eq 'foobar') { | ||
| 12 | return ($name,'Jane Doe'); | ||
| 13 | } | ||
| 14 | return; | ||
| 15 | } | ||
| 16 | |||
| 17 | |||
| 18 | 1; | ||
| 19 | |||
| 20 | __END__ |