Branch Coverage

blib/lib/Plack/Middleware/Auth/OAuth2/ProtectedResource.pm
Criterion Covered Total %
branch 24 32 75.0


line true false branch
28 0 34 unless my $parser = 'OAuth::Lite2::ParamMethods'->get_param_parser($req)
35 4 30 unless $token
41 6 24 unless $access_token
44 0 24 unless $access_token->isa('OAuth::Lite2::Model::AccessToken')
47 6 18 unless ($access_token->created_on + $access_token->expires_in > time)
49 3 3 if ($is_legacy) { }
58 0 18 unless $auth_info
61 0 18 unless $auth_info->isa('OAuth::Lite2::Model::AuthInfo')
64 6 12 unless $dh->validate_client_by_id($auth_info->client_id)
67 6 6 unless $dh->validate_user_by_id($auth_info->user_id)
72 6 0 if $auth_info->scope
80 28 0 if ($_->isa('OAuth::Lite2::Server::Error')) { }
84 28 0 if $self->{'realm'}
86 3 25 if $_->description
89 0 28 if $self->{'error_uri'}
93 14 14 if ($is_legacy) { }