Branch Coverage

blib/lib/Dancer2/Plugin/OAuth2/Server.pm
Criterion Covered Total %
branch 31 40 77.5


line true false branch
17 0 31 unless ($ok)
47 2 0 unless ref $scopes eq 'ARRAY'
52 3 5 if (not $res[0]) { }
70 11 4 $scope ? :
72 4 11 if (not defined $c_id && defined $type or $type ne 'code')
90 1 1 if ($state_required and not defined $state and not length $state)
108 6 4 if ($res)
109 0 6 if (not $server->login_resource_owner($dsl, $settings)) { }
116 0 6 if (not defined $res) { }
0 6 elsif ($res == 0) { }
128 6 4 if ($res) { }
4 0 elsif ($error) { }
146 5 5 if defined $state
159 0 6 if (not defined $grant_type or $grant_type ne 'authorization_code' and $grant_type ne 'refresh_token' or $grant_type eq 'authorization_code' and not defined $auth_code or $grant_type eq 'authorization_code' and not defined $url)
183 1 5 if ($grant_type eq 'refresh_token') { }
194 5 1 if ($client) { }
1 0 elsif ($error) { }
238 8 1 if (not $refresh_token) { }
239 7 1 if (my $auth_header = $dsl->app->request->header('Authorization')) { }
242 0 7 if ($auth_type ne 'Bearer') { }