You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure this behaviour is the one expected. When I try to verify a token with a claim that is not present in the token I got a NullPointerException.
Reproduction
I got it in my own code and here's a scratch to reproduce it:
Exception in thread "main" java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
at java.util.Arrays.asList(Arrays.java:3800)
at com.auth0.jwt.JWTVerifier.assertValidClaim(JWTVerifier.java:412)
at com.auth0.jwt.JWTVerifier.verifyClaims(JWTVerifier.java:391)
at com.auth0.jwt.JWTVerifier.verify(JWTVerifier.java:355)
at Scratch.main(scratch_1.java:17)
Environment
Version of this library used: 3.4.0
Personally I would expect to get a JWTVerificationException or InvalidClaimException.
The text was updated successfully, but these errors were encountered:
Raph22
changed the title
NullPointerException when the claims doesn't exist in the token
NullPointerException when the claim doesn't exist in the token
Feb 11, 2020
Sorry I m just realizing that there is more recent version now. I ll test tomorrow if you have changed this behaviour in the latest version and will close it if yes otherwise no.
EDIT: Still the same behaviour in 3.9.0
Description
I am not sure this behaviour is the one expected. When I try to verify a token with a claim that is not present in the token I got a NullPointerException.
Reproduction
I got it in my own code and here's a scratch to reproduce it:
StackTrace
Environment
Personally I would expect to get a JWTVerificationException or InvalidClaimException.
The text was updated successfully, but these errors were encountered: