Branch Coverage

blib/lib/Catalyst/Authentication/Credential/HTTP.pm
Criterion Covered Total %
branch 43 98 43.8


line true false branch
35 0 6 $app->debug ? :
48 0 6 unless (grep /$type/, ('basic', 'digest', 'any'))
58 0 11 $self->require_ssl ? :
0 11 if $self->require_ssl ? $c->req->base->scheme ne 'https' : 0
61 11 0 if $self->_is_http_auth_type('digest')
62 0 11 if $auth
64 11 0 if $self->_is_http_auth_type('basic')
65 2 9 if $auth
72 9 0 unless ($self->no_unprompted_authorization_required)
81 0 11 if $c->debug
85 4 7 if (my($username, $password) = $headers->authorization_basic)
87 4 0 if (ref $user_obj) { }
89 4 0 if $self->password_field
91 2 2 if ($self->check_password($user_obj, $opts)) { }
95 0 2 if $c->debug
100 0 0 if $c->debug
112 0 11 if $c->debug
117 4 0 unless $authorization =~ /^Digest/
127 0 0 unless $nonce
129 0 0 if $c->debug
147 0 0 unless ($check)
148 0 0 if $c->debug
154 0 0 if $c->debug
161 0 0 unless ($user_obj = $auth_info->{'user'})
164 0 0 unless ($user_obj)
165 0 0 if $c->debug
173 0 0 if ($res{'qop'} eq 'auth-int')
186 0 0 $r ? :
191 0 0 if ($nonce->algorithm eq 'MD5-sess')
199 0 0 $res{'qop'} ? :
205 0 0 if ($rq_digest eq $res{'response'})
216 0 9 unless $c->can('cache')
224 40 0 if $cfgtype eq 'any' or $cfgtype eq lc $type
233 2 7 if (exists $self->{'authorization_required_message'}) { }
235 1 1 if defined $self->authorization_required_message
244 9 0 if $self->_create_digest_auth_response($c, $auth_info)
245 9 0 if $self->_create_basic_auth_response($c, $auth_info)
247 0 9 unless ($ok)
264 0 9 unless $self->_is_http_auth_type('digest')
266 9 0 if (my $digest = $self->_build_digest_auth_header($c, $opts))
277 0 9 unless $self->_is_http_auth_type('basic')
279 9 0 if (my $basic = $self->_build_basic_auth_header($c, $opts))
289 2 16 $opts->{'realm'} ? :
18 0 if (my $realm_name = &String::Escape::qprintable(scalar($opts->{'realm'} ? $opts->{'realm'} : $self->realm->name)))
290 18 0 unless $realm_name =~ /^"/
298 4 14 if (my $domain = $opts->{'domain'})
299 0 4 unless ref $domain and ref $domain eq 'ARRAY'
305 2 2 $self->use_uri_for ? :
352 0 9 if (my $algorithm = $opts->{'algorithm'} || $self->algorithm)