axiam-sdk 1.0.0 → 1.1.0
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/README.md +91 -12
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/{client-yD0eMwHQ.d.cts → client-7ZKtfXW-.d.cts} +640 -14
- package/dist/{client-0WJkblDE.d.ts → client-Putxo-yi.d.ts} +640 -14
- package/dist/{cookieJar-hWRmZkhe.d.ts → cookieJar-Cw6Zdeec.d.ts} +1 -1
- package/dist/{cookieJar-CTD5jOmd.d.cts → cookieJar-DkGcIr-i.d.cts} +1 -1
- package/dist/{errors-m0Tue_pE.d.cts → errors-CtP_lviy.d.cts} +15 -1
- package/dist/{errors-CmBvsxV0.d.ts → errors-VpViVRSx.d.ts} +15 -1
- package/dist/grpc/index.d.cts +3 -3
- package/dist/grpc/index.d.ts +3 -3
- package/dist/grpc/index.js +572 -14
- package/dist/grpc/index.js.map +1 -1
- package/dist/grpc/index.mjs +572 -14
- package/dist/grpc/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +594 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +592 -16
- package/dist/index.mjs.map +1 -1
- package/dist/middleware/index.d.cts +3 -3
- package/dist/middleware/index.d.ts +3 -3
- package/dist/middleware/index.js +26 -3
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware/index.mjs +26 -3
- package/dist/middleware/index.mjs.map +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +598 -17
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +598 -17
- package/dist/node/index.mjs.map +1 -1
- package/dist/{oidcState-mQLVn3-A.d.cts → oidcState-Cz6erz0g.d.cts} +24 -3
- package/dist/{oidcState-DOSCgnMG.d.ts → oidcState-zGt6VU6v.d.ts} +24 -3
- package/dist/rest/index.d.cts +58 -7
- package/dist/rest/index.d.ts +58 -7
- package/dist/rest/index.js +594 -15
- package/dist/rest/index.js.map +1 -1
- package/dist/rest/index.mjs +592 -16
- package/dist/rest/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2292,9 +2292,21 @@ var OidcClient = class {
|
|
|
2292
2292
|
* and obtain the code pair.
|
|
2293
2293
|
*
|
|
2294
2294
|
* @remarks
|
|
2295
|
-
* **
|
|
2296
|
-
*
|
|
2297
|
-
*
|
|
2295
|
+
* **The client authenticates as it does at every other token request
|
|
2296
|
+
* (contract 1.62, §14.1 rule 2).** A client built with a `clientSecret` sends
|
|
2297
|
+
* it as `client_secret` in the **form body** — never as `Authorization:
|
|
2298
|
+
* Basic`, whatever the client is registered for (§12.1 rule 3 stands for
|
|
2299
|
+
* this route, and the maintainer's 2026-10-16 "same rules" reading fixes the
|
|
2300
|
+
* form body) — and a client with a §6.1 client certificate presents it on the
|
|
2301
|
+
* connection, through the `mtls_endpoint_aliases` entry when discovery
|
|
2302
|
+
* publishes one (§21.3). **A public client sends no credential at all** and
|
|
2303
|
+
* is never refused client-side, so a device that cannot hold a secret still
|
|
2304
|
+
* works. The SDK sends a credential only when its caller configured one: it
|
|
2305
|
+
* never borrows one from another configuration. `private_key_jwt` client
|
|
2306
|
+
* authentication is not implemented by this SDK.
|
|
2307
|
+
*
|
|
2308
|
+
* A `401` with `{"error":"invalid_client"}` is an {@link OAuthProtocolError}
|
|
2309
|
+
* (§14.2 rule 5), is made once, and does not enter the §9 refresh guard.
|
|
2298
2310
|
*/
|
|
2299
2311
|
async deviceAuthorize(params = {}) {
|
|
2300
2312
|
const configuration = params.configuration ?? await this.oidcDiscover();
|
|
@@ -2306,6 +2318,7 @@ var OidcClient = class {
|
|
|
2306
2318
|
}
|
|
2307
2319
|
const form = new URLSearchParams();
|
|
2308
2320
|
form.set("client_id", this.#options.clientId);
|
|
2321
|
+
this.#appendClientSecret(form);
|
|
2309
2322
|
if (params.scope !== void 0) {
|
|
2310
2323
|
form.set("scope", Array.isArray(params.scope) ? params.scope.join(" ") : params.scope);
|
|
2311
2324
|
}
|
|
@@ -2416,6 +2429,15 @@ var OidcClient = class {
|
|
|
2416
2429
|
* {@link OAuthProtocolError} — `authorization_pending` and `slow_down`
|
|
2417
2430
|
* included — so a hand-rolled loop sees exactly what {@link deviceLogin}
|
|
2418
2431
|
* sees. Most callers want {@link deviceLogin}.
|
|
2432
|
+
*
|
|
2433
|
+
* Client authentication is the one {@link deviceAuthorize} describes
|
|
2434
|
+
* (contract 1.62, §14.1 rule 2): a configured `clientSecret` is sent as
|
|
2435
|
+
* `client_secret` in the form body, never as `Authorization: Basic`; a public
|
|
2436
|
+
* client sends none; `client_id` is sent on **every** poll (§14.1 rule 3). A
|
|
2437
|
+
* `401 invalid_client` surfaces as {@link OAuthProtocolError}, is not retried
|
|
2438
|
+
* and does not enter the §9 refresh guard (§14.2 rule 5). This SDK ships no
|
|
2439
|
+
* DPoP proof generator, so it cannot drive a client registered for DPoP; it
|
|
2440
|
+
* surfaces that client's refusal as the same `invalid_client`.
|
|
2419
2441
|
*/
|
|
2420
2442
|
async devicePoll(params) {
|
|
2421
2443
|
const configuration = params.configuration ?? await this.oidcDiscover();
|
|
@@ -2423,6 +2445,7 @@ var OidcClient = class {
|
|
|
2423
2445
|
form.set("grant_type", DEVICE_CODE_GRANT_TYPE);
|
|
2424
2446
|
form.set("device_code", exposeSecret(params.deviceCode));
|
|
2425
2447
|
form.set("client_id", this.#options.clientId);
|
|
2448
|
+
this.#appendClientSecret(form);
|
|
2426
2449
|
const wire = await this.#postToken(configuration, form, params.tenantId);
|
|
2427
2450
|
return this.#toTokenSet(wire, configuration, void 0);
|
|
2428
2451
|
}
|