Closed Richyeoh closed 4 months ago
fun encode(iat: Long, exp: Long, uid: String): String { val build = JWT.create() build.withClaim("uid", uid) build.withExpiresAt(Date(System.currentTimeMillis() + EXPIRES_TIME)) return build.sign(Algorithm.HMAC256(SECRET)) } fun decode(token: String): DecodedJWT { return JWT.require(Algorithm.HMAC256(SECRET)).build().verify(token) }
Here is my kotlin code, When I using decode fun throw an exception IncorrectClaimException
I using decode fun throw an exception IncorrectClaimException
No response
4.4.0
17
Checklist
Description
Here is my kotlin code, When I using decode fun throw an exception IncorrectClaimException
Reproduction
I using decode fun throw an exception IncorrectClaimException
Additional context
No response
java-jwt version
4.4.0
Java version
17