Condition Coverage

blib/lib/Mojolicious/Plugin/OAuth2/Server.pm
Criterion Covered Total %
condition 64 81 79.0


and 3 conditions

line !l l&&!r l&&r condition
169 19 2 0 $config->{'users'} and not $config->{'jwt_secret'}
262 6 6 36 defined $client_id and defined $type
6 0 36 defined $client_id and defined $type and $type =~ /^(code|token)$/
487 8 0 14 !$old_refresh_token && $scope
527 23 9 18 $grant_type ne "authorization_code" and $grant_type ne "refresh_token"
9 23 0 $grant_type eq "authorization_code" and not defined $auth_code
9 23 0 $grant_type eq "authorization_code" and not defined $uri
547 7 0 3 $client_id and $client_secret

or 2 conditions

line l !l condition
166 5 16 $config->{'authorize_route'} // "/oauth/authorize"
167 5 16 $config->{'access_token_route'} // "/oauth/access_token"
179 28 119 $config->{$_} // undef
188 24 96 $config->{$_} // undef
197 23 77 $config->{$_} // undef
205 20 40 $config->{$_} // undef
251 1 47 $args //= {}
258 1 47 $args->{'user_id'} // undef
315 0 1 $error_description //= "resource owner denied access"
411 221 315 $self->param($_) // undef
416 49 18 $grant_type //= ""
586 6 1 $encoded_details // ""

or 3 conditions

line l !l&&r !l&&!r condition
230 99 1 0 $Grant ||= $AuthCodeGrant
240 20 12 0 $oauth_details->{'client_id'} ||= $oauth_details->{'client'}
253 1 41 6 $args->{'client_id'} // $self->param("client_id")
254 1 35 12 $args->{'redirect_uri'} // $self->param("redirect_uri")
255 1 41 6 $args->{'response_type'} // $self->param("response_type")
256 0 26 22 $args->{'scope'} // $self->param("scope")
257 0 30 18 $args->{'state'} // $self->param("state")
527 18 0 32 $grant_type ne "authorization_code" and $grant_type ne "refresh_token" or $grant_type eq "authorization_code" and not defined $auth_code
0 0 32 $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 $uri
530 7 0 0 $username or $password
650 4 3 0 $client->{'client_id'} || $client->{'client'}