Skip to content

Is it possible to verify if a JWE token has expired? or set an expiry time for a JWE token? #299

Answered by panva
dalegacusan asked this question in Q&A
Discussion options

You must be logged in to vote

JWEs just like JWSs do not have expiration. JWT in either JWS or JWE syntax do. And for JWT using JWE syntax there's a module. 12. Be sure to choose the right algorithm for encrypted JWEs tho. They only really make sense if you're both the issuer and recipient, the alg: dir and enc: A256GCM is a good fit then. Otherwise Signed JWTs are really superior in being able to provide non-repudiation.

Footnotes

  1. https://github.com/panva/jose/blob/v4.1.1/docs/classes/jwt_encrypt.EncryptJWT.md

  2. https://github.com/panva/jose/blob/v4.1.1/docs/functions/jwt_decrypt.jwtDecrypt.md

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Spomky
Comment options

@panva
Comment options

@Spomky
Comment options

Answer selected by dalegacusan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants