Authentication
Oryonix lets you control how API calls to your services are authenticated. You can configure API keys for each environment using the onix environment auth create command.
API keys are useful when you do not have a UI and need to call your APIs directly. They may also be a good choice if you want to test your APIs yourself before releasing them to end users.
Generate an API Key
Ensure you are on the Git branch linked to your target environment before running the following command.
onix environment auth create --name "API key" --type api_key
The above command will generate an API key for the environment. This API key will be shown only once, so make sure you save it securely.
Authentication Flow
To authenticate your API calls, pass the key as a bearer token in the Authorization header:
curl https://your-service-url/hello -H "Authorization: Bearer <API key>"