Skip to main content
The gateway supports three auth schemes. Which one to use depends on where the request originates.

Schemes at a glance


Bearer (OIDC)

OIDC authentication is in Alpha. Full self-serve configuration is coming soon. Contact us if you need OIDC support today.
Pass the user’s JWT from your OIDC provider directly.

GatelitSigned

Your backend exchanges a service key for a short-lived HMAC-signed token via the gateway’s token exchange endpoint. The token encodes the subject and optional constraints (model, org, max tokens). The gateway verifies the signature without a DB call.
Exchange a service key for a signed token:
When to use: Frontend apps where you need per-user model restrictions with short-lived tokens. The short TTL means leaked tokens expire quickly.
Token exchange requires a service key created in the dashboard. No raw signing secret is ever exposed to your backend.

GatelitKey

A long-lived service key created in the dashboard.
Create keys in Settings → Service Keys. Each key can optionally be scoped to a specific org. When to use: Backend-to-backend, scripts, CI pipelines, or any server-side code where managing token expiry is inconvenient.
Never use a service key in browser/frontend code. It cannot be expired quickly and has no per-request TTL.

Org-scoped provider keys

When your token includes an orgId (either via the JWT claims or a GatelitSigned token), the gateway uses that org’s provider keys configured in the dashboard. This lets each org bring their own provider keys (BYOK) while falling back to your gateway’s default keys.