HTTP API.

Every route the server serves: the app API, the browser routes, the server's own routes, and the admin API.

On this page
  1. The four groups
  2. Authentication
  3. Problems
  4. The document

Every route the tensile-auth server serves for apps: the app API under /v1/, which the app's backend calls with its app key, and the browser routes under /auth/, which the app proxies.

The four groups

GroupBase pathRoutesWho calls it
App API/v1/9The app's backend calls these routes with its app key. The SDK wraps them: check is POST /v1/check.
Browser routes/auth/49The browser client and the elements call these routes on the app's own origin, and the app's proxy forwards them to the server. Refusals are RFC 9457 problems.
Server routes/auth/15The server adds these routes under /auth/: agents and tokens for the signed-in person, agent claims, OAuth consent, device approval, and secret-scanning alerts.
Admin API/admin/v1/18Administrators call these routes with a session that has a second factor. Changes from a stale session, an agent, or a token are refused.

Authentication

Each route names how its caller authenticates. The document defines 3 ways:

  • App key, in the Tensile-App-Key header.
  • A session token, as Authorization: Bearer. A session token, human or agent. A browser can send the session cookie instead.
  • The __Host-session cookie.

The app key belongs to the app's backend and never reaches the browser. It never acts for a person by itself: calls on a person's behalf also carry that person's credential.

Problems

Every refusal is an RFC 9457 problem, as application/problem+json. Branch on code, and show title and fix to people. The error catalog lists every code, with its status and fix.

The document

These pages render the server's OpenAPI 3.1.0 document, version 1, when the site is built. The server also serves it at GET /v1/openapi.json, and this site has a copy at /docs/reference/openapi.json.