Branch Coverage

blib/lib/Mojolicious/Plugin/BasicAuthPlus.pm
Criterion Covered Total %
branch 24 38 63.1


line true false branch
23 8 16 if ref $password eq 'CODE'
24 6 18 if ref $password eq 'HASH'
27 1 1 unless $auth or $callback or $params
37 5 18 if $callback and &$callback(split(/:/, $auth, 2))
41 6 12 if $auth eq ($username || '') . ":$password"
45 10 2 if ($auth)
46 4 6 if ($$params{'username'} and $$params{'password'}) { }
2 4 elsif ($$params{'path'}) { }
0 4 elsif ($$params{'host'}) { }
47 4 0 if $plugin->_check_simple($self, $auth, $params)
51 2 0 if $plugin->_check_passwd($self, $auth, $params)
55 0 0 if $plugin->_check_ldap($self, $auth, $params)
70 0 24 if ref $realm eq 'HASH'
89 0 6 unless defined $username
90 0 6 unless defined $password
99 4 0 if $username eq $$params{'username'} and 'Authen::Simple::Password'->check($password, $$params{'password'})
109 0 0 unless defined $password
112 0 0 if $ldap->authenticate($username, $password)
121 2 0 if $passwd->authenticate($username, $password)