Skip to content

Support for Millisecond timestamps #539

Description

@BillyAB

I am trying to use this library to verify a JWS token that is generated and supplied by a 3rd party for which I have no control over the generation of the token, I've simply been provided their private key.

When I have looked at a token they send, the "iat" and "exp" timestamps are provided in milliseconds, this causes the JWT\BeforeValidException of Cannot handle token with iat prior to 55763-11-20T08:06:45+0000

I have found that I can work around this by calling JWT::$timestamp = microtime(true) * 1000; before the JWT::decode which seems to "fix" the issue, but it seems a little hacky.

Are there any possibilities of this library being updated to check/support milliseconds for the timestamps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions