Branch Coverage

blib/lib/Catalyst/Authentication/Credential/HTTP.pm
Criterion Covered Total %
branch 50 98 51.0


line true false branch
35 0 7 $app->debug ? :
48 0 7 unless (grep /$type/, ('basic', 'digest', 'any'))
58 1 14 $self->require_ssl ? :
1 14 if $self->require_ssl ? $c->req->base->scheme ne 'https' : 0
61 11 3 if $self->_is_http_auth_type('digest')
62 0 14 if $auth
64 14 0 if $self->_is_http_auth_type('basic')
65 3 11 if $auth
72 11 1 unless ($self->no_unprompted_authorization_required)
81 0 14 if $c->debug
85 5 9 if (my($username, $password) = $headers->authorization_basic)
87 5 0 if (ref $user_obj) { }
89 5 0 if $self->password_field
91 3 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 45 5 if $cfgtype eq 'any' or $cfgtype eq lc $type
233 2 9 if (exists $self->{'authorization_required_message'}) { }
235 1 1 if defined $self->authorization_required_message
244 9 2 if $self->_create_digest_auth_response($c, $auth_info)
245 11 0 if $self->_create_basic_auth_response($c, $auth_info)
247 0 11 unless ($ok)
264 2 9 unless $self->_is_http_auth_type('digest')
266 9 0 if (my $digest = $self->_build_digest_auth_header($c, $opts))
277 0 11 unless $self->_is_http_auth_type('basic')
279 11 0 if (my $basic = $self->_build_basic_auth_header($c, $opts))
289 2 18 $opts->{'realm'} ? :
20 0 if (my $realm_name = &String::Escape::qprintable(scalar($opts->{'realm'} ? $opts->{'realm'} : $self->realm->name)))
290 20 0 unless $realm_name =~ /^"/
298 4 16 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)