Branch Coverage

blib/lib/Ado/Plugin/Auth.pm
Criterion Covered Total %
branch 33 72 45.8


line true false branch
19 0 23 if (@auth_methods > 1)
21 0 0 if $m eq 'ado'
24 0 0 if keys %{$$conf{'providers'}{$m};} < 2
32 0 23 if &List::Util::first(sub { $_ eq 'google'; } , @auth_methods)
34 0 23 if &List::Util::first(sub { $_ eq 'google'; } , @auth_methods)
40 3 0 if $Ado::Control::DEV_MODE
49 0 0 if $Ado::Control::DEV_MODE
69 5 0 if $Ado::Control::DEV_MODE
70 3 2 if ($c->user->login_name eq 'guest')
72 3 0 if $Ado::Control::DEV_MODE
96 2 15 unless ($c->session('over_route'))
99 0 2 unless $referrer =~ /^$base_url/
101 2 0 if $Ado::Control::DEV_MODE
105 7 10 if $c->req->method ne 'POST' and $auth_method eq 'ado'
110 10 0 if $Ado::Control::DEV_MODE
113 8 2 if (eval { do { $authnticated = $c->$login_helper; 1 } }) { }
114 2 6 if ($authnticated) { }
118 2 0 if $Ado::Control::DEV_MODE
124 5 1 unless ($c->res->code // !1)
146 1 7 unless $val->has_data
147 1 6 if ($val->csrf_protect->has_error('csrf_token'))
155 2 4 if ($val->has_error)
163 1 3 if (not $user->id or $user->disabled)
171 2 1 if ($checksum eq $val->param('digest'))
179 1 0 if $Ado::Control::DEV_MODE
195 0 0 if ($Ado::Control::DEV_MODE)
199 0 0 if ($response->{'access_token'}) { }
229 0 0 if ($Ado::Control::DEV_MODE)
234 0 0 if ($response->{'access_token'}) { }
256 0 0 if ($user->disabled or $user->stop_date != 0 and $user->stop_date < $time or $user->start_date > $time)
274 0 0 if (my $user = 'Ado::Model::Users'->add(_user_info_to_args($user_info, $provider)))
302 0 0 if $Ado::Control::DEV_MODE
307 0 0 if ($user->id)
328 0 0 if ($user->id)
353 0 0 if (index($provider->{'info_url'}, 'google') > -1) { }
0 0 elsif (index($provider->{'info_url'}, 'facebook') > -1) { }