line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Event::RPC::AuthPasswdHash; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
192
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
0
|
13
|
sub get_passwd_href { shift->{passwd_href} } |
7
|
0
|
|
|
0
|
0
|
0
|
sub set_passwd_href { shift->{passwd_href} = $_[1] } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
1
|
|
|
1
|
0
|
3
|
my $class = shift; |
11
|
1
|
|
|
|
|
2
|
my ($passwd_href) = @_; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
3
|
my $self = bless { |
14
|
|
|
|
|
|
|
passwd_href => $passwd_href, |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
3
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub check_credentials { |
21
|
2
|
|
|
2
|
0
|
2
|
my $self = shift; |
22
|
2
|
|
|
|
|
6
|
my ($user, $pass) = @_; |
23
|
2
|
|
|
|
|
9
|
return $pass eq $self->get_passwd_href->{$user}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |