Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions modus/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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/"}'
```

<Tip>
Expand Down