GOAL uses OAuth 2.0 (Laravel Passport) with Keycloak as identity provider
for interactive users.
client_id + client_secret).POST /oauth/token
Content-Type: application/json
{
"grant_type": "client_credentials",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"scope": ""
}
Authorization: Bearer <access_token>
x-app-stage: <stage>
x-app-uid: <application uid>
Never put
client_secretor tokens in URLs, logs, or client-side code.
Authorization-code flow against the GOAL Keycloak realm; the backend exchanges the
code for a GOAL token. TODO: realm names, redirect URI registration.
Users can create API keys from their profile (/personal-access-tokens).
TODO: scopes and expiration policy.
| HTTP | Meaning |
|---|---|
| 400 | Invalid grant / malformed request |
| 401 | Missing, expired or revoked token |
| 403 | Token valid but stage or user access denied |
| 429 | Rate limit exceeded (60 req/min on token endpoints) |