Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 940 Bytes

File metadata and controls

24 lines (17 loc) · 940 Bytes

hosted-oauth-server

Multi-tenant host for the typescript-oauth-server core.

A "tenant" is one Authlete service (cluster url, service id, service access token) triple. The host is a stateless multiplexer: it provisions tenants, then serves each tenant's OAuth endpoints under /t/:service_id by mounting the core app with that tenant's credentials.

Endpoints

  • POST /tenants — register a tenant. Body: { service_id, cluster_url, service_access_token }. Create-only; 409 if taken.
  • DELETE /tenants/{service_id} — deregister a tenant. Send Authorization: Bearer <service_access_token>.

The /t/:service_id data plane is served entirely by the mounted core from typescript-oauth-server.

Develop

cp .env.example .env
npm install
npm run dev               # local server
npm test                  # end-to-end test