DJabberd/Authen/StaticPassword.pm

filter: Statementstmt 58.8% 10 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 4 totaltotal 48.2% 14 / 29 CC 2 SCAR 9.4
CC
2
Cov
53%
check_cleartext
6.0
get_password
2.0
BEGIN
1.0
CRAP 2.6
« DJabberd/Component/Example.pm ↑ Summary DJabberd/SASL/DumbPlainManager.pm »
1 package DJabberd::Authen::StaticPassword;
2 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 20 ▶use base 'DJabberd::Authen';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 41 ▶sub set_config_password {
Subroutine set_config_password: called CC=1 SCAR=0.0
Pod undocumented
6 41 my ($self, $pass) = @_;
7 41 $self->{password} = $pass;
8 }
9  
10 41 ▶sub can_retrieve_cleartext { 1 }
Subroutine can_retrieve_cleartext: called CC=1 SCAR=0.0
Pod undocumented
11  
12 0 ▶sub get_password {
Subroutine get_password: not called CC=1 SCAR=6.9
Pod undocumented
13 0 my ($self, $cb, %args) = @_;
14 0 $cb->set($self->{password});
15 }
16  
17 0 ▶sub check_cleartext {
Subroutine check_cleartext: not called CC=2 SCAR=17.9
Pod undocumented
18 0 my ($self, $cb, %args) = @_;
19 0 ▶ if ($args{password} eq $self->{password}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"password"} eq $self->{"password"}) 0 0 0
20 0 $cb->accept;
21 0 return;
22 }
23 0 $cb->reject;
24 }
25  
26 20 1;
« DJabberd/Component/Example.pm ↑ Summary DJabberd/SASL/DumbPlainManager.pm »