docs: add missing jwt claims and clock skew (#3908)

This commit is contained in:
Taimoor Zaeem
2025-02-22 13:19:10 +01:00
committed by Wolfgang Walther
parent 8649d27709
commit acb72b7c67
+9 -1
View File
@@ -159,7 +159,15 @@ You can specify the literal value as we saw earlier, or reference a filename to
JWT Claims Validation
~~~~~~~~~~~~~~~~~~~~~
PostgREST honors the :code:`exp` claim for token expiration, rejecting expired tokens.
PostgREST honors the following `JWT claims <https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4>`_:
- ``exp`` Expiration Time
- ``iat`` Issued At
- ``nbf`` Not Before
- ``aud`` Audience, see :ref:`jwt-aud`
.. note::
PostgREST allows for a 30-second clock skew when validating the ``exp`` and ``iat`` claims. In other words, it gives an extra 30 seconds before the token is rejected if there is a slight discrepancy in the timestamps.
JWT Security
~~~~~~~~~~~~