From f567cde4248a56919de8ea70602c3283074b0ad8 Mon Sep 17 00:00:00 2001 From: Tegar Imansyah Date: Sat, 30 Nov 2024 22:48:03 +0700 Subject: [PATCH] Update authentication page to include JWKS --- modus/authentication.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modus/authentication.mdx b/modus/authentication.mdx index 05dea2fd..892752f7 100644 --- a/modus/authentication.mdx +++ b/modus/authentication.mdx @@ -22,14 +22,15 @@ property on your endpoint to `"bearer-token"` in your Once set, Modus verifies tokens passed in the `Authorization` header of incoming requests against the public keys you provide. To enable this verification, you -must pass the public keys using the `MODUS_PEMS` environment variable. +must pass the public keys using the `MODUS_PEMS` or `MODUS_JWKS_ENDPOINTS` environment variable. -The value of the `MODUS_PEMS` environment variable should be a JSON object with +The value of the `MODUS_PEMS` or `MODUS_JWKS_ENDPOINTS` environment variable should be a JSON object with the public keys as key-value pairs. This is an example of how to set the -`MODUS_PEMS` environment variable: +`MODUS_PEMS` and `MODUS_JWKS_ENDPOINTS` environment variable: ```bash export MODUS_PEMS='{\"key1\":\"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwJ9z1z1z1z1z1z\\n-----END PUBLIC KEY-----\"}' +export MODUS_JWKS_ENDPOINTS='{"my-auth-provider":"https://myauthprovider.com/application/o/myappname/jwks/"}' ```