Branch Coverage

blib/lib/Mojo/JWT.pm
Criterion Covered Total %
branch 23 36 63.8


line true false branch
40 0 10 unless my $algo = $self->algorithm(delete $header->{'alg'})->algorithm
43 0 10 if $peek
47 1 9 if ($algo eq 'none') { }
2 7 elsif ($algo =~ /$re_rs/) { }
7 0 elsif ($algo =~ /$re_hs/) { }
48 0 1 unless $self->allow_none
51 1 1 unless $self->verify_rsa($1, $payload, $signature)
54 1 6 unless $signature eq $self->sign_hmac($1, $payload)
62 0 8 if (defined(my $exp = $claims->{'exp'}))
63 0 0 if $now > $exp
66 0 8 if (defined(my $nbf = $claims->{'nbf'}))
67 0 0 if $now < $nbf
79 1 9 if ($self->set_iat)
80 0 10 if (defined(my $exp = $self->expires))
81 0 10 if (defined(my $nbf = $self->not_before))
89 1 9 if ($algo eq 'none') { }
2 7 elsif ($algo =~ /$re_rs/) { }
7 0 elsif ($algo =~ /$re_hs/) { }