Event-RPC
view release on metacpan or search on metacpan
lib/Event/RPC/AuthPasswdHash.pm view on Meta::CPAN
package Event::RPC::AuthPasswdHash;
use strict;
use Carp;
sub get_passwd_href { shift->{passwd_href} }
sub set_passwd_href { shift->{passwd_href} = $_[1] }
sub new {
my $class = shift;
my ($passwd_href) = @_;
my $self = bless {
passwd_href => $passwd_href,
};
return $self;
}
sub check_credentials {
my $self = shift;
my ($user, $pass) = @_;
return $pass eq $self->get_passwd_href->{$user};
}
1;
( run in 1.060 second using v1.01-cache-2.11-cpan-5623c5533a1 )