@adonis-agora/authkit-sdk 1.0.0-rc.3 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @adonis-agora/authkit-sdk
2
2
 
3
+ ## 1.0.0-rc.4
4
+
5
+ ### Minor Changes
6
+
7
+ - [#495](https://github.com/DavideCarvalho/adonis-agora-authkit/pull/495) [`4830805`](https://github.com/DavideCarvalho/adonis-agora-authkit/commit/4830805039c3f0e978c403d3062275a892704eb7) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Separate servers: every piece of an Agora deployment can run without authkit-server in its process.
8
+
9
+ - `authkitTenantVerifier({ issuer, resource, environment? })` (authkit-client) verifies service-tenant tokens on any server against the issuer's discovered JWKS and returns `{ partition, environment?, capabilities, clientId, expiresAt }` or `null`. `authkitTenantToken` now takes the token endpoint only from discovery (no guessed path).
10
+ - Service tenants get an optional `environment` (console, Admin API, SDK, `--environment`), emitted as the `environment` claim. Both verifiers take `environment` and, when it is set, accept only tokens claiming exactly that environment (fail closed); authkit-server's in-process verifier also returns `environment`. One service-tenant client gets tokens for every `urn:agora:*` resource declared.
11
+ - `registerOidcClient` announces `POST /auth/logout` as `account.signOut` on the `agora.consoles` registry (skipped when authkit-server runs in the app), so every console shows a sign-out.
12
+ - `Identity.actor` (`{ sub, email? }`) from the RFC 8693 `act` claim of an impersonated token (`deriveActor` in authkit-core).
13
+ - Org labels: authkit-server serves `GET /api/orgs/labels?ids=` (first-party confidential clients, Basic auth) and emits `org_name` for the active org; authkit-client installs a cached `Context.setTenantLabeler` (`orgLabels` option, `authkitOrgLabels`).
14
+ - Webhooks: the body carries `id` and `actorId`, `events.webhook` accepts a list; authkit-client's `registerAuthkitWebhook` / `authkitWebhookHandler` verify the HMAC, the `ts` window and the id, and re-emit on the diagnostics bus as `agora:authkit:<type>` with the in-process payload.
15
+ - `identityFromAccessToken`, `bindAuthkitIdentity` and `bridgeAuthkitToken` put a verified authkit bearer token on `ctx.authkit`.
16
+
3
17
  ## 1.0.0-rc.3
4
18
 
5
19
  ### Major Changes
@@ -120,6 +120,7 @@ export interface AuthkitClient {
120
120
  serviceTenant: {
121
121
  partition: string;
122
122
  capabilities: string[];
123
+ environment?: string;
123
124
  } | null;
124
125
  }
125
126
  /** `clients.list`: `search` matches the client id or name; `sort` is `clientId` or `clientName`. */
@@ -142,6 +143,7 @@ export interface ClientInput {
142
143
  serviceTenant?: {
143
144
  partition: string;
144
145
  capabilities?: string[];
146
+ environment?: string | null;
145
147
  } | null;
146
148
  }
147
149
  /** Created/regenerated client — the secret is shown ONCE (`createdClientDto`). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonis-agora/authkit-sdk",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Backend SDK for the AuthKit Admin API with one typed interface and two drivers: remote (HTTP/Bearer) and embedded (in-process when the IdP runs in the same AdonisJS app).",
5
5
  "license": "MIT",
6
6
  "author": "dudousxd",
@@ -51,7 +51,7 @@
51
51
  }
52
52
  },
53
53
  "devDependencies": {
54
- "@adonis-agora/authkit-server": "1.0.0-rc.17",
54
+ "@adonis-agora/authkit-server": "1.0.0-rc.24",
55
55
  "@adonisjs/core": "7.6.0",
56
56
  "@adonisjs/tsconfig": "2.0.0",
57
57
  "@japa/assert": "4.2.0",