breezy-zebra-64533
08/27/2024, 2:19 PMchilly-king-10285
08/27/2024, 2:19 PMchilly-king-10285
08/27/2024, 2:19 PMbash ory patch oauth2-config --project <project-id> --workspace <workspace-id> \ --add '/oauth2/token_hook/url="<https://my-example.app/token-hook>"' \ --add '/oauth2/token_hook/auth/type="api_key"' \ --add '/oauth2/token_hook/auth/config/in="header"' \ --add '/oauth2/token_hook/auth/config/name="X-API-Key"' \ --add '/oauth2/token_hook/auth/config/value="MY API KEY"' \ --format yaml
In this command, replace <project-id>
and <workspace-id>
with your project and workspace IDs. Also, replace "<https://my-example.app/token-hook>"
with your webhook endpoint URL, and "MY API KEY"
with your actual API key. This command will register your webhook endpoint with Ory Hydra, and configure it to send the API key in the HTTP header when making requests to your endpoint. For more information, refer to the [Ory Hydra documentation](https://www.ory.sh/docs/hydra/guides/claims-at-refresh#configuration).breezy-zebra-64533
08/27/2024, 2:20 PMchilly-king-10285
08/27/2024, 2:20 PMchilly-king-10285
08/27/2024, 2:20 PMexport
command in Unix-based systems (like macOS and Linux) or the set
command in Windows CMD. Here are examples for each: For macOS and Linux: bash export ORY_SDK_URL=https://$<http://PROJECT_SLUG.projects.oryapis.com|PROJECT_SLUG.projects.oryapis.com>
For Windows CMD: cmd set ORY_SDK_URL=https://$<http://PROJECT_SLUG.projects.oryapis.com|PROJECT_SLUG.projects.oryapis.com>
In these commands, replace $PROJECT_SLUG
with your actual project slug. These commands will set the ORY_SDK_URL
environment variable to the URL of your Ory project's APIs. For more information, refer to the [Ory documentation](https://www.ory.sh/docs/getting-started/integrate-auth/expressjs#run-your-expressjs-app).breezy-zebra-64533
08/27/2024, 2:21 PMchilly-king-10285
08/27/2024, 2:21 PMchilly-king-10285
08/27/2024, 2:21 PMbash ory patch oauth2-config --project <project-id> --workspace <workspace-id> \ --add '/oauth2/token_hook/url="<https://my-example.app/token-hook>"' \ --add '/oauth2/token_hook/auth/type="api_key"' \ --add '/oauth2/token_hook/auth/config/in="header"' \ --add '/oauth2/token_hook/auth/config/name="X-API-Key"' \ --add '/oauth2/token_hook/auth/config/value="MY API KEY"' \ --format yaml
In this command, replace <project-id>
and <workspace-id>
with your project and workspace IDs. Also, replace "<https://my-example.app/token-hook>"
with your webhook endpoint URL, and "MY API KEY"
with your actual API key. This command will register your webhook endpoint with Ory Hydra, and configure it to send the API key in the HTTP header when making requests to your endpoint. For more information, refer to the [Ory Hydra documentation](https://www.ory.sh/docs/hydra/guides/claims-at-refresh#configuration).