Skip to main content
The Bearer scheme lets you reuse your existing authentication layer. If a user already holds a valid OIDC JWT from your identity provider, they can pass it to Gatelit without any additional token-signing step. The gateway decodes the token, fetches your provider’s public keys from its JWKS endpoint, and verifies the signature. No token storage or introspection endpoint calls are made — only the signature and standard claims (exp, iss, sub) are checked.

Supported providers

Any OIDC provider that exposes a /.well-known/jwks.json endpoint under the token’s iss claim will work.

Usage with GatelitClient

Pass your identity provider’s token in getToken with scheme: "Bearer".
Once the client is configured, use it normally:

Using the token directly (without the SDK)

If you’re not using GatelitClient, set the Authorization header manually:

How verification works

When the gateway receives a Bearer token it:
  1. Decodes the JWT header to read the kid (key ID) claim.
  2. Reads the iss (issuer) claim from the payload.
  3. Fetches the provider’s JWKS from <issuer>/.well-known/jwks.json (cached for one hour).
  4. Finds the matching public key by kid.
  5. Verifies the HMAC or RSA signature.
  6. Checks that the token has not expired (exp claim).
The gateway extracts the user’s sub claim for request attribution in logs. No other user data is read from the token.