Skip to content

No examples on how to set expiry of token #92

Open

Description

@neogeno

If I set a standard claim "exp" in my JWE token with expiry date in the past it doesn't seem to make any difference. Other libraries will throw an error saying the token has expired? What is the correct usage in this library to specify token expiry?

Activity

  1. rohe commented on Sep 17, 2019

    @rohe
    Contributor

    I'm not sure I get the question.
    Creating a JWE token with an "exp" claim that is in the past is possible to do.
    The "exp" claim is only verified when the payload is verified. So it's not part of verifying a signature or doing a decryption.

  2. neogeno commented on Sep 17, 2019

    @neogeno
    Author

    I mean when I decrypt the token and verify the signature of such a JWE there is no error saying the token has expired. I am still able to view the payload as normal. So do you mean I have to manually check the value of the exp claim to see if the token has expired or not? Pyjwt for example will raise an error when decoding/verifying such tokens if the JWT is expired .

  3. aksh-gupta commented on Nov 20, 2020

    @aksh-gupta

    @neogeno Were you able to set exp in JWE or you implemented the expiration of token manually?

  4. neogeno commented on Nov 20, 2020

    @neogeno
    Author

    Had to write a seperate check

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions