progrium/pyjwt — pull request #11 by Lothiraldan (2013-06-06 09:12:44+00:00)
Title: Add support for expiration date verification in jwt.decode

In order to avoid replay attacks, we need support expiration date support in pyjwt. Here is a first naive implementation.

Rfc for reference:

The exp (expiration time) claim identifies the expiration time on or after
which the JWT MUST NOT be accepted for processing. The processing of the
exp claim requires that the current date/time MUST be before the expiration
date/time listed in the exp claim. Implementers MAY provide for some small
leeway, usually no more than a few minutes, to account for clock skew. Its
value MUST be a number containing an IntDate value. Use of this claim is
OPTIONAL.