Branch Coverage

blib/lib/Plack/Middleware/Auth/JWT.pm
Criterion Covered Total %
branch 38 42 90.4


line true false branch
20 9 1 unless $self->psgix_claims
21 9 1 unless $self->psgix_token
23 8 2 unless defined $self->token_header_name
25 1 9 unless $self->token_header_name
26 8 2 unless defined $self->token_query_name
27 1 9 unless $self->token_query_name
28 6 4 unless defined $self->token_required
29 9 1 unless defined $self->ignore_invalid_token
32 5 5 if (my $cb = $self->decode_callback) { }
5 0 elsif (my $args = $self->decode_args) { }
33 0 5 unless ref $cb eq 'CODE'
39 4 1 unless exists $args->{'verify_exp'}
40 5 0 unless exists $args->{'leeway'}
53 15 15 if ($self->token_header_name and $env->{'HTTP_AUTHORIZATION'}) { }
13 2 elsif (my $name = $self->token_query_name) { }
56 15 0 if $auth =~ /^\s*$name\s+(.+)/i
63 8 22 unless ($token)
64 6 2 if $self->token_required
71 8 14 if (my $cb = $self->decode_callback) { }
78 9 13 if ($@) { }
79 1 8 if ($self->ignore_invalid_token) { }