billions-minister-2901
07/31/2024, 8:40 PMchilly-king-10285
07/31/2024, 8:40 PMchilly-king-10285
07/31/2024, 8:41 PMURLS_LOGIN
is an environment variable that sets the URL of the login provider. This is a required setting when deploying Ory Hydra. The service that handles requests at this URL will be set up in subsequent sections of the deployment process. In the context of a Docker deployment, for example, the URLS_LOGIN
might be set as follows: bash -e URLS_LOGIN=<http://localhost:9020/login>
This means that the login provider's service will be accessible at <http://localhost:9020/login>
. Source: [Deploy Ory Hydra](https://www.ory.sh/docs/hydra/self-hosted/configure-deploy#deploy-ory-hydra)billions-minister-2901
07/31/2024, 8:41 PMchilly-king-10285
07/31/2024, 8:41 PMchilly-king-10285
07/31/2024, 8:42 PMlogin_challenge
query parameter to this URL. The value of this parameter is an ID which should later be used by the login endpoint to fetch important information about the request. Here is an example of how you might set up this endpoint: bash ory patch oauth2-config --replace "/urls/login=\"<https://login.example.org/oauth2-login\>""
In this example, <https://login.example.org/oauth2-login>
is the login endpoint. When Ory initiates the OAuth2 flow, it will redirect the user's browser to this URL with a login_challenge
query parameter. Source: [User login and consent flow](https://www.ory.sh/docs/oauth2-oidc/custom-login-consent/flow#login)billions-minister-2901
07/31/2024, 9:48 PMchilly-king-10285
07/31/2024, 9:48 PMchilly-king-10285
07/31/2024, 9:48 PMcurl
in a shell script, you can add headers using the -H
option: bash curl -X POST '<https://your-ory-endpoint>' \ -H 'Content-Type: application/json' \ -H 'Your-Custom-Header: Your Value' \ -d '{ "your": "data" }'
In this example, Your-Custom-Header: Your Value
is the custom header. Please note that while you can add custom headers to your requests, the Ory APIs may not necessarily use these headers. The APIs have specific headers they expect and use, as documented in the API reference. For example, when creating an OAuth2 client, you must include the API Key in the Authorization
header of the request: bash curl -X POST 'SDK_CONFIGURATION_URL/admin/clients' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ORY_API_KEY' \ -d '{ "client_name": "YOUR_CLIENT_NAME", "grant_types": [ "authorization_code" ], "redirect_uris": [ "<http://127.0.0.1:5555/callback>" ], "response_types": [ "code", "id_token", "refresh_token" ], "scope": "openid offline" }'
In this example, Authorization: Bearer ORY_API_KEY
is the required header. Source: [Create OAuth2 client in Ory Network](https://www.ory.sh/docs/hydra/guides/custom-ui-oauth2#create-oauth2-client-in-ory-network)