| 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
| |||||||||||
| 20 | 0 | $cb->accept; | |||||||||
| 21 | 0 | return; | |||||||||
| 22 | } | ||||||||||
| 23 | 0 | $cb->reject; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 20 | 1; | |||||||||