Describe the problem
getClaim("X").asX returns null for values that have valid toString representations
When creating a private claim with an integer value -
withClaim("ID", 1234)
the decoded JWT
getClaim("ID").asString()
returns null
When creating a private claim with a boolean value -
withClaim("flag", true)
the decoded JWT
getClaim("flag").asString()
returns null
What was the expected behavior?
An integer value would return the string representation of the value (just as Integer.toString() does)
A boolean value would return the string representation of the value (just as Boolean.toString() does)
Versions
java-jwt: 4.0.0
java - JDK 11
spring boot - 2.7.4