From e20dc60e834153843c20434b011c8ceafc043ee8 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Fri, 9 May 2025 20:45:37 -0500 Subject: [PATCH] docs: jwt role extraction link to config The feature section was missing a link to its config. Also shorten the section name. --- docs/references/auth.rst | 8 ++++---- docs/references/configuration.rst | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/auth.rst b/docs/references/auth.rst index 5de9abdce..0e7d2c3ab 100644 --- a/docs/references/auth.rst +++ b/docs/references/auth.rst @@ -188,12 +188,12 @@ It works this way: + If the match fails or if the ``aud`` value is not a string or array of strings, then the token will be rejected with a :ref:`401 Unauthorized ` error. + If the ``aud`` key **is not present** or if its value is ``null`` or ``[]``, PostgREST will interpret this token as allowed for all audiences and will complete the request. -.. _jwt_role_claim_key_extract: +.. _jwt_role_extract: -JWT Role Claim Key Extraction -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +JWT Role Extraction +~~~~~~~~~~~~~~~~~~~ -A JSPath DSL that specifies the location of the :code:`role` key in the JWT claims. This can be used to consume a JWT provided by a third party service like Auth0, Okta, Microsoft Entra or Keycloak. +A JSPath DSL that specifies the location of the :code:`role` key in the JWT claims. It's configured by :ref:`jwt-role-claim-key`. This can be used to consume a JWT provided by a third party service like Auth0, Okta, Microsoft Entra or Keycloak. The DSL follows the `JSONPath `_ expression grammar with extended string comparison operators. Supported operators are: diff --git a/docs/references/configuration.rst b/docs/references/configuration.rst index 560d4f22b..656d396bf 100644 --- a/docs/references/configuration.rst +++ b/docs/references/configuration.rst @@ -616,7 +616,7 @@ jwt-role-claim-key *For backwards compatibility, this config parameter is also available without prefix as "role-claim-key".* - See :ref:`jwt_role_claim_key_extract` on how to specify key paths and usage examples. + See :ref:`jwt_role_extract` on how to specify key paths and usage examples. .. _jwt-secret: