michelp / pgjwt

PostgreSQL implementation of JWT (JSON Web Tokens)
MIT License
368 stars 60 forks source link

Check nbf and exp claims #21

Closed burrscurr closed 3 years ago

burrscurr commented 3 years ago

This commit adds support for the reserved nbf (not before) and exp (expires) claims. In addition to a valid signature, the current time to be within the range expressed in the nbf and exp claims. Both nbf and exp are optional: If omitted or assigned an invalid value, the lower or upper time boundary does not apply, respectively.

This PR closes #19.

michelp commented 3 years ago

Thanks!

nounder commented 3 years ago

Thanks @burrscurr!

burrscurr commented 2 years ago

Unfortunately my commit breaks the extension relocatability since try_cast_double is called without @extschema@ prefix. I propose a fix in #22.