diff --git a/auth.rst b/auth.rst index e67fc3a62..99a29c1f3 100644 --- a/auth.rst +++ b/auth.rst @@ -208,20 +208,22 @@ To use Auth0, create `an application `_ for .. note:: -Our code requires a database role in the JWT. To add it you need to save the database role in Auth0 `app metadata `_. Then, you will need to write `a rule `_ that will extract the role from the user's app_metadata and set it as a `custom claim `_ in the access token. Note that, you may use Auth0's `core authorization feature `_ for more complex use cases. Metadata solution is mentioned here for simplicity. + Our code requires a database role in the JWT. To add it you need to save the database role in Auth0 `app metadata `_. Then, you will need to write `a rule `_ that will extract the role from the user's app_metadata and set it as a `custom claim `_ in the access token. Note that, you may use Auth0's `core authorization feature `_ for more complex use cases. Metadata solution is mentioned here for simplicity. -.. code:: javascript + .. code:: javascript - function (user, context, callback) { + function (user, context, callback) { - // Follow the documentations at http://postgrest.org/en/v7.0.0/configuration.html#role-claim-key - // to set a custom role claim on PostgREST and use it as custom claim attribute in this rule - const myRoleClaim = 'https://myapp.com/role'; - - user.app_metadata = user.app_metadata || {}; - context.accessToken[myRoleClaim] = user.app_metadata.role; - callback(null, user, context); - } + // Follow the documentations at + // http://postgrest.org/en/latest/configuration.html#role-claim-key + // to set a custom role claim on PostgREST + // and use it as custom claim attribute in this rule + const myRoleClaim = 'https://myapp.com/role'; + + user.app_metadata = user.app_metadata || {}; + context.accessToken[myRoleClaim] = user.app_metadata.role; + callback(null, user, context); + } .. _asym_keys: diff --git a/conf.py b/conf.py index 67fba7041..29f4382cb 100644 --- a/conf.py +++ b/conf.py @@ -288,4 +288,4 @@ texinfo_documents = [ # -- Custom setup --------------------------------------------------------- def setup(app): - app.add_stylesheet('css/custom.css') + app.add_css_file('css/custom.css') diff --git a/install.rst b/install.rst index 165a4b6ee..9b4756abd 100644 --- a/install.rst +++ b/install.rst @@ -18,7 +18,7 @@ If you use **FreeBSD**, then you can install PostgREST from the `official ports pkg install hs-postgrest -If you use **Arch Linux**, then you can install PostgREST from the `official repo `_. +If you use **Arch Linux**, then you can install PostgREST from the `community repo `_. .. code:: bash @@ -40,7 +40,7 @@ If you use Windows, you can install PostgREST using `Chocolatey `. Running -~~~~~~~ +------- If you downloaded PostgREST from the release page, first extract the compressed file to obtain the executable.