Keats / jsonwebtoken

JWT lib in rust
MIT License
1.61k stars 253 forks source link

Support millisecond validation on `exp` of Claims #355

Closed 1552980358 closed 6 months ago

1552980358 commented 6 months ago

JVM language usually use UTC timestamp in millisecond (System.currentTimeMillis()), and I have a requirement on checking the timestamp at database field of exp timestamp on both Rust and JVM server. Is there is any posibility on supporting validation of exp with support of millisecond? (Like adding a flag in Validation prompting the timestamp format is UTC in millisecond)

Keats commented 6 months ago

Nope, if exp is in milliseconds then it's not a valid JWT. You will have to do it by hand if you want to support that.

1552980358 commented 6 months ago

Nope, if exp is in milliseconds then it's not a valid JWT. You will have to do it by hand if you want to support that.

I see, sorry for my issue