Condition Coverage

blib/lib/Mojolicious/Plugin/OAuth2/Server.pm
Criterion Covered Total %
condition 65 84 77.3


and 3 conditions

line !l l&&!r l&&r condition
169 20 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 15 !$old_refresh_token && $scope
527 23 9 20 $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 1 0 12 $client_id and $client_secret
599 0 0 18 $client_id and $client_secret

or 2 conditions

line l !l condition
166 5 17 $config->{'authorize_route'} // "/oauth/authorize"
167 5 17 $config->{'access_token_route'} // "/oauth/access_token"
179 28 126 $config->{$_} // undef
188 24 102 $config->{$_} // undef
197 23 82 $config->{$_} // undef
205 20 43 $config->{$_} // undef
251 1 47 $args //= {}
258 1 47 $args->{'user_id'} // undef
315 0 1 $error_description //= "resource owner denied access"
411 235 341 $self->param($_) // undef
416 52 20 $grant_type //= ""
589 6 1 $encoded_details // ""

or 3 conditions

line l !l&&r !l&&!r condition
230 104 1 0 $Grant ||= $AuthCodeGrant
240 20 14 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 20 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
661 4 3 0 $client->{'client_id'} || $client->{'client'}