axiam-sdk 1.0.0-alpha31 → 1.0.0-alpha37

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 CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  Official TypeScript/JavaScript client SDK for [AXIAM](https://github.com/ilpanich/axiam) — Access eXtended Identity and Authorization Management.
10
10
 
11
+ **Platform documentation:** <https://ilpanich.github.io/axiam/> — getting started, the authorization model, the OAuth2/OIDC surface, and the operations guides. This README covers the SDK; the site covers the server it talks to.
12
+
11
13
  ## Package identity
12
14
 
13
15
  - **npm package:** `axiam-sdk`
@@ -707,78 +709,116 @@ strings.
707
709
 
708
710
  See `examples/express-oidc-login.ts` for a complete, runnable example.
709
711
 
710
- ## Secure Remote Password (CONTRACT.md §23)
712
+ ## OPAQUE (CONTRACT.md §23)
711
713
 
712
- `loginSrp` proves the password without sending it. What crosses the wire is `A`
713
- and a proof, neither of which is useful to anyone who does not already hold the
714
- account's verifier.
714
+ `loginOpaque` proves the password without sending it. What crosses the wire is
715
+ a blinded group element and a MAC, neither useful without the account's
716
+ registration record **and** the tenant's OPRF seed.
715
717
 
716
718
  ```ts
717
- // Same LoginResult as login(), including the mfa_required branch.
718
- const result = await client.loginSrp('alice', 'correct horse battery staple');
719
+ const result = await client.loginOpaque('alice', 'correct horse battery staple');
719
720
  ```
720
721
 
721
- Fall back to `login()` when the tenant does not offer SRP. That case is a
722
- `NetworkError` naming SRP, deliberately **not** an `AuthError`, so it cannot be
723
- mistaken for a bad password:
722
+ It takes the same arguments as `login` and returns the same `LoginResult`, MFA
723
+ branch included, so switching a tenant to OPAQUE needs no change to how the
724
+ result is handled.
725
+
726
+ ### Falling back — and when not to
727
+
728
+ Fall back to `login()` when the tenant does not offer OPAQUE, or when this
729
+ installation cannot perform it. Both are a `NetworkError`, deliberately **not**
730
+ an `AuthError`, so neither can be mistaken for a bad password:
724
731
 
725
732
  ```ts
726
733
  let result;
727
734
  try {
728
- result = await client.loginSrp(user, password);
735
+ result = await client.loginOpaque(user, password);
729
736
  } catch (err) {
730
- if (err instanceof NetworkError && err.message.includes('does not offer Secure Remote Password')) {
731
- result = await client.login(user, password);
732
- } else {
733
- throw err;
734
- }
737
+ if (!(err instanceof NetworkError)) throw err; // <- not a fallback case
738
+ result = await client.login(user, password);
735
739
  }
736
740
  ```
737
741
 
742
+ The `if` is the important line. **Any other error is a failed login**, and
743
+ retrying it over `login()` would hand the plaintext to a server that just
744
+ failed to prove it holds the record.
745
+
746
+ ### What this buys, and what it does not
747
+
748
+ OPAQUE closes holes TLS 1.3 does not:
749
+
750
+ - a TLS-terminating reverse proxy, ingress controller, CDN or service mesh sees
751
+ every plaintext password today; under OPAQUE it sees a blinded group element;
752
+ - an accidental request-body log, a heap dump or a crash reporter can no longer
753
+ capture a plaintext password, because the server never has one;
754
+ - **a stolen record database is not offline-crackable on its own.** Recovering a
755
+ password additionally requires the tenant's OPRF seed, encrypted at rest
756
+ separately. This is the property SRP could not offer, and the main reason
757
+ AXIAM replaced it.
758
+
759
+ It does **not** protect against a compromised AXIAM server, and in a browser it
760
+ does not protect against AXIAM serving malicious JavaScript.
761
+
738
762
  ### Enrolment
739
763
 
740
- The server cannot compute a verifier — it never sees the plaintext — so one has
741
- to be sent with any request that sets a password:
764
+ The server cannot build a record — it never sees the plaintext — so one has to
765
+ be sent with any request that sets a password:
742
766
 
743
767
  ```ts
744
- const srp = await client.srpEnrollment({
745
- identity: 'alice', // the USERNAME — see below
746
- password: 'new password',
747
- group: 'rfc5054_4096',
748
- kdf: 'argon2id',
749
- });
750
- // send `srp` as the request's `srp` field
768
+ const opaque = await client.opaqueEnrollment(newPassword);
769
+ // send `opaque` as the request body's `opaque` field
751
770
  ```
752
771
 
753
- The tenant's group and KDF come from `GET /api/v1/auth/me` for an authenticated
754
- caller, or `GET /api/v1/auth/reset/context` for a reset-token holder.
755
-
756
- ### Three things that will bite you
772
+ One argument, where the SRP verifier this replaces took four. There is no
773
+ `identity` — a record binds to a credential identifier the server chooses, so
774
+ enrolling against an email can no longer produce something no login can satisfy,
775
+ and a later rename cannot invalidate it — and no group or KDF, because the
776
+ server names them in its `register/start` response and this call honours what
777
+ it names.
757
778
 
758
- **The identity is the username, always.** `x` is derived over
759
- `username ":" password`. A user may sign in with their email, but only the
760
- username is inside the KDF — which is why the challenge response carries an
761
- `identity` field and why `loginSrp` uses that rather than what was typed.
762
- Enrolling against an email produces a verifier no login can satisfy.
779
+ It is `async` because that response has to be fetched: OPAQUE's envelope is
780
+ sealed under the server's oblivious PRF, so there is no offline computation that
781
+ produces a valid record. The SRP verifier needed no network at all.
763
782
 
764
- **`loginSrp` is slow, on purpose.** It runs the tenant's KDF: Argon2id at
765
- 19 MiB by default, tens to hundreds of milliseconds. That cost is what makes a
766
- stolen verifier expensive to attack offline. In a browser, consider a Web
767
- Worker.
783
+ ### This SDK does not implement OPAQUE
768
784
 
769
- **What it protects, and what it does not.** A TLS-terminating proxy, an
770
- accidentally verbose request log, or a heap dump on the server can no longer
771
- capture a plaintext password, because the server never has one. It does **not**
772
- protect against a compromised AXIAM server, and in a browser it does not protect
773
- against AXIAM serving malicious JavaScript.
785
+ CONTRACT.md §23.1 forbids it. SRP was hand-written eleven times because it is
786
+ modular arithmetic every language has; OPAQUE needs an oblivious PRF,
787
+ `hash_to_curve`, `expand_message_xmd`, an envelope construction and a
788
+ three-message AKE. `core/srp.ts` — 419 lines of it — is replaced by a loader
789
+ around `@axiam/opaque-wasm`, the WebAssembly build of the same implementation
790
+ the AXIAM server links and every other SDK binds.
774
791
 
775
792
  ### Runtime requirements
776
793
 
777
- WebCrypto (`globalThis.crypto.subtle`) — present in Node 18+, Deno, Bun and
778
- every browser — plus `hash-wasm` for Argon2id, which is a dependency rather than
779
- optional because §23.3 rule 4 makes both KDFs mandatory and `argon2id` is what
780
- AXIAM's default policy asks for. It is imported lazily, so a consumer who never
781
- calls SRP does not pay the wasm payload at module-load time.
794
+ `@axiam/opaque-wasm` is an **optional peer dependency**:
795
+
796
+ ```bash
797
+ npm install @axiam/opaque-wasm
798
+ ```
799
+
800
+ Optional, because an installation that never touches the OPAQUE path should not
801
+ be made to carry a WebAssembly module. When it is absent, `opaqueAvailable()`
802
+ resolves to `false` and `loginOpaque` rejects with a `NetworkError` — reporting
803
+ rather than throwing at login time is what §23.1 asks of an SDK whose native
804
+ artifact did not load, and it is why the fallback above works unchanged.
805
+
806
+ ```ts
807
+ if (!(await client.opaqueAvailable())) {
808
+ // use login() — this installation cannot do OPAQUE
809
+ }
810
+ ```
811
+
812
+ It is imported lazily and memoized, so a consumer who never calls OPAQUE does
813
+ not pay the wasm payload at module-load time, and two concurrent logins do not
814
+ instantiate it twice.
815
+
816
+ ### Cost
817
+
818
+ `loginOpaque` runs the tenant's key-stretching function: Argon2id at 19 MiB and
819
+ t=2 by default, tens to hundreds of milliseconds of synchronous work. That cost
820
+ is the point — it is what makes a stolen record expensive to attack even by
821
+ someone holding the OPRF seed. In a browser, consider a Web Worker.
782
822
 
783
823
  ## Device authorization grant (`axiam-sdk/node`, CONTRACT.md §14)
784
824
 
@@ -176,69 +176,42 @@ declare function delayMs(attempt: number, retryAfterMs: number | undefined, frac
176
176
  */
177
177
  declare function withRetry<T>(fn: (attempt: number) => Promise<T>, options: RetryOptions): Promise<T>;
178
178
 
179
- /** The verifier and its parameters, for any endpoint that sets a password. */
180
- interface SrpEnrollment {
181
- /** RFC 5054 group name the verifier lives in, e.g. `rfc5054_4096`. */
182
- group: string;
183
- /** KDF used to derive `x`: `argon2id` or `pbkdf2_sha256`. */
184
- kdf: string;
185
- /** Argon2id memory cost in KiB; absent for PBKDF2. */
186
- memory_kib?: number;
187
- /** KDF iteration (PBKDF2) or time (Argon2id) cost. */
188
- iterations: number;
189
- /** Argon2id lane count; absent for PBKDF2. */
190
- parallelism?: number;
191
- /**
192
- * The 32-byte enrolment salt, lowercase hex. Freshly generated per enrolment
193
- * (§23.3 rule 11): a reused salt would make every verifier in a tenant
194
- * attackable with one precomputation.
195
- */
196
- salt: string;
197
- /**
198
- * `v = g^x mod N`, lowercase hex. The only password-derived value the server
199
- * ever receives, and computationally infeasible to invert.
200
- */
201
- verifier: string;
202
- }
203
- /** Options for {@link srpEnrollment}. */
204
- interface SrpEnrollmentOptions {
179
+ /**
180
+ * A completed enrolment, to send with any request that sets a password.
181
+ *
182
+ * Two fields, where the SRP verifier it replaces had seven. The server chose
183
+ * the credential identifier, the ciphersuite and the costs and sealed them into
184
+ * `opaque_session` — which is why a client cannot name any of them, and why it
185
+ * cannot enrol a record against somebody else's account.
186
+ */
187
+ interface OpaqueEnrollment {
205
188
  /**
206
- * The account's **username** — the canonical identity the challenge endpoint
207
- * hands back. Passing an email produces a verifier no login can ever satisfy.
189
+ * The `opaque_session` from `register/start`, echoed **verbatim**.
190
+ *
191
+ * Opaque sealed server state carrying the credential identifier, the
192
+ * ciphersuite and the costs. Do not parse, cache, or reuse it across
193
+ * exchanges (§23.4 rule 8) — it is valid for 120 seconds.
208
194
  */
209
- identity: string;
210
- /** The plaintext password being set. It never leaves this process. */
211
- password: string;
212
- /** From the tenant's policy (`GET /api/v1/auth/me`, or the reset context). */
213
- group: string;
214
- /** The KDF the tenant enrols under: `argon2id` or `pbkdf2_sha256`. */
215
- kdf: string;
216
- /** KDF cost; defaults to AXIAM's own for the chosen KDF when omitted. */
217
- iterations?: number;
218
- /** Argon2id memory cost in KiB; ignored for PBKDF2. */
219
- memoryKib?: number;
220
- /** Argon2id lane count; ignored for PBKDF2. */
221
- parallelism?: number;
195
+ opaque_session: string;
196
+ /** Lowercase-hex serialized RFC 9807 `RegistrationRecord`. */
197
+ registration_record: string;
222
198
  }
223
199
  /**
224
- * Compute a verifier for `password`, to send with any request that sets one
225
- * (user creation, change-password, reset completion).
200
+ * Build a registration record for `password`, to send with any request that
201
+ * sets one (user creation, change-password, reset completion).
226
202
  *
227
- * The server cannot compute this — it never sees the plaintext — so it has to
228
- * arrive with the request or not at all. The salt is 32 fresh bytes from the
229
- * platform CSPRNG (§23.3 rule 11).
230
- */
231
- declare function srpEnrollment(options: SrpEnrollmentOptions): Promise<SrpEnrollment>;
232
- /**
233
- * Whether this SDK build can perform SRP.
203
+ * This performs a `register/start` round trip, which the SRP verifier it
204
+ * replaces did not need: OPAQUE's envelope is sealed under the server's
205
+ * oblivious PRF, so there is no offline computation that produces a valid
206
+ * record.
234
207
  *
235
- * Always `true` for TypeScript: `BigInt` is native and both KDFs are available
236
- * (`hash-wasm` for Argon2id, WebCrypto for PBKDF2). It exists because §23.1
237
- * puts it in the locked method vocabulary for every SDK, and in PHP — which
238
- * needs `ext-gmp` or `ext-bcmath` and is guaranteed neither — it genuinely
239
- * answers `false`.
208
+ * Note the absence of an `identity` argument. The SRP version required the
209
+ * account's canonical username, and passing an email produced a verifier no
210
+ * login could ever satisfy. A record binds to a credential identifier the
211
+ * server chooses, so there is nothing here to get wrong — and a later rename
212
+ * cannot invalidate it.
240
213
  */
241
- declare function srpAvailable(): boolean;
214
+ declare function opaqueEnrollment(client: AxiamClient, password: string): Promise<OpaqueEnrollment>;
242
215
 
243
216
  /**
244
217
  * The main entry point for the AXIAM TypeScript/JavaScript SDK — an
@@ -332,21 +305,36 @@ declare class AxiamClient {
332
305
  /** `POST /api/v1/auth/login` (§1, D-18). */
333
306
  login(email: string, password: string): Promise<LoginResult>;
334
307
  /**
335
- * SRP-6a login (§23) — the password never leaves this process.
308
+ * OPAQUE login (§23) — the password never leaves this process.
336
309
  *
337
310
  * Returns the same `LoginResult` as {@link login}, including the
338
311
  * `mfa_required` branch, so one result handler serves both. Rejects with a
339
- * `NetworkError` naming SRP when the tenant has it disabled, so a caller can
340
- * fall back to {@link login} rather than mistaking it for a bad password.
312
+ * `NetworkError` naming OPAQUE when the tenant has it disabled, so a caller
313
+ * can fall back to {@link login} rather than mistaking it for a bad password.
314
+ *
315
+ * **Only that case may fall back.** Any other rejection is a failed login,
316
+ * and retrying it over {@link login} would hand the plaintext to a server
317
+ * that just failed to prove it holds the record.
341
318
  */
342
- loginSrp(usernameOrEmail: string, password: string): Promise<LoginResult>;
319
+ loginOpaque(usernameOrEmail: string, password: string): Promise<LoginResult>;
343
320
  /**
344
- * Compute an SRP verifier to send with any request that sets a password
345
- * (§23). The server cannot derive one — it never sees the plaintext.
321
+ * Build an OPAQUE registration record to send with any request that sets a
322
+ * password (§23). The server cannot build one — it never sees the plaintext.
323
+ *
324
+ * Asynchronous because it performs a `register/start` round trip: the
325
+ * envelope is sealed under the server's oblivious PRF, so unlike the SRP
326
+ * verifier this replaces there is no offline computation that produces a
327
+ * valid record.
328
+ */
329
+ opaqueEnrollment(password: string): Promise<OpaqueEnrollment>;
330
+ /**
331
+ * Whether this installation can perform OPAQUE (§23.2).
332
+ *
333
+ * Asynchronous, and genuinely able to answer `false`: `@axiam/opaque-wasm` is
334
+ * an optional peer dependency, so an installation that skipped it reports
335
+ * rather than throwing at login time.
346
336
  */
347
- srpEnrollment(options: SrpEnrollmentOptions): Promise<SrpEnrollment>;
348
- /** Whether this runtime can perform SRP (§23.1). Always true here. */
349
- srpAvailable(): boolean;
337
+ opaqueAvailable(): Promise<boolean>;
350
338
  /** `POST /api/v1/auth/mfa/verify` (§1, D-18). Completes the two-phase flow started by login(). */
351
339
  verifyMfa(mfaToken: string, code: string): Promise<LoginResult>;
352
340
  /** `POST /api/v1/auth/refresh` (§1). Usually driven reactively by the response interceptor (D-07). */
@@ -361,4 +349,4 @@ declare class AxiamClient {
361
349
  batchCheck(checks: AccessCheck[]): Promise<AccessDecision[]>;
362
350
  }
363
351
 
364
- export { AxiamClient as A, BASE_DELAY_MS as B, DecisionMemo as D, type FinishRequest as F, MAX_ATTEMPTS as M, type RetryOptions as R, type SrpEnrollment as S, TelemetryReporter as T, MAX_DELAY_MS as a, MAX_TTL_MS as b, type SrpEnrollmentOptions as c, backoffMs as d, delayMs as e, srpEnrollment as f, memoKey as m, srpAvailable as s, withRetry as w };
352
+ export { AxiamClient as A, BASE_DELAY_MS as B, DecisionMemo as D, type FinishRequest as F, MAX_ATTEMPTS as M, type OpaqueEnrollment as O, type RetryOptions as R, TelemetryReporter as T, MAX_DELAY_MS as a, MAX_TTL_MS as b, backoffMs as c, delayMs as d, memoKey as m, opaqueEnrollment as o, withRetry as w };
@@ -176,69 +176,42 @@ declare function delayMs(attempt: number, retryAfterMs: number | undefined, frac
176
176
  */
177
177
  declare function withRetry<T>(fn: (attempt: number) => Promise<T>, options: RetryOptions): Promise<T>;
178
178
 
179
- /** The verifier and its parameters, for any endpoint that sets a password. */
180
- interface SrpEnrollment {
181
- /** RFC 5054 group name the verifier lives in, e.g. `rfc5054_4096`. */
182
- group: string;
183
- /** KDF used to derive `x`: `argon2id` or `pbkdf2_sha256`. */
184
- kdf: string;
185
- /** Argon2id memory cost in KiB; absent for PBKDF2. */
186
- memory_kib?: number;
187
- /** KDF iteration (PBKDF2) or time (Argon2id) cost. */
188
- iterations: number;
189
- /** Argon2id lane count; absent for PBKDF2. */
190
- parallelism?: number;
191
- /**
192
- * The 32-byte enrolment salt, lowercase hex. Freshly generated per enrolment
193
- * (§23.3 rule 11): a reused salt would make every verifier in a tenant
194
- * attackable with one precomputation.
195
- */
196
- salt: string;
197
- /**
198
- * `v = g^x mod N`, lowercase hex. The only password-derived value the server
199
- * ever receives, and computationally infeasible to invert.
200
- */
201
- verifier: string;
202
- }
203
- /** Options for {@link srpEnrollment}. */
204
- interface SrpEnrollmentOptions {
179
+ /**
180
+ * A completed enrolment, to send with any request that sets a password.
181
+ *
182
+ * Two fields, where the SRP verifier it replaces had seven. The server chose
183
+ * the credential identifier, the ciphersuite and the costs and sealed them into
184
+ * `opaque_session` — which is why a client cannot name any of them, and why it
185
+ * cannot enrol a record against somebody else's account.
186
+ */
187
+ interface OpaqueEnrollment {
205
188
  /**
206
- * The account's **username** — the canonical identity the challenge endpoint
207
- * hands back. Passing an email produces a verifier no login can ever satisfy.
189
+ * The `opaque_session` from `register/start`, echoed **verbatim**.
190
+ *
191
+ * Opaque sealed server state carrying the credential identifier, the
192
+ * ciphersuite and the costs. Do not parse, cache, or reuse it across
193
+ * exchanges (§23.4 rule 8) — it is valid for 120 seconds.
208
194
  */
209
- identity: string;
210
- /** The plaintext password being set. It never leaves this process. */
211
- password: string;
212
- /** From the tenant's policy (`GET /api/v1/auth/me`, or the reset context). */
213
- group: string;
214
- /** The KDF the tenant enrols under: `argon2id` or `pbkdf2_sha256`. */
215
- kdf: string;
216
- /** KDF cost; defaults to AXIAM's own for the chosen KDF when omitted. */
217
- iterations?: number;
218
- /** Argon2id memory cost in KiB; ignored for PBKDF2. */
219
- memoryKib?: number;
220
- /** Argon2id lane count; ignored for PBKDF2. */
221
- parallelism?: number;
195
+ opaque_session: string;
196
+ /** Lowercase-hex serialized RFC 9807 `RegistrationRecord`. */
197
+ registration_record: string;
222
198
  }
223
199
  /**
224
- * Compute a verifier for `password`, to send with any request that sets one
225
- * (user creation, change-password, reset completion).
200
+ * Build a registration record for `password`, to send with any request that
201
+ * sets one (user creation, change-password, reset completion).
226
202
  *
227
- * The server cannot compute this — it never sees the plaintext — so it has to
228
- * arrive with the request or not at all. The salt is 32 fresh bytes from the
229
- * platform CSPRNG (§23.3 rule 11).
230
- */
231
- declare function srpEnrollment(options: SrpEnrollmentOptions): Promise<SrpEnrollment>;
232
- /**
233
- * Whether this SDK build can perform SRP.
203
+ * This performs a `register/start` round trip, which the SRP verifier it
204
+ * replaces did not need: OPAQUE's envelope is sealed under the server's
205
+ * oblivious PRF, so there is no offline computation that produces a valid
206
+ * record.
234
207
  *
235
- * Always `true` for TypeScript: `BigInt` is native and both KDFs are available
236
- * (`hash-wasm` for Argon2id, WebCrypto for PBKDF2). It exists because §23.1
237
- * puts it in the locked method vocabulary for every SDK, and in PHP — which
238
- * needs `ext-gmp` or `ext-bcmath` and is guaranteed neither — it genuinely
239
- * answers `false`.
208
+ * Note the absence of an `identity` argument. The SRP version required the
209
+ * account's canonical username, and passing an email produced a verifier no
210
+ * login could ever satisfy. A record binds to a credential identifier the
211
+ * server chooses, so there is nothing here to get wrong — and a later rename
212
+ * cannot invalidate it.
240
213
  */
241
- declare function srpAvailable(): boolean;
214
+ declare function opaqueEnrollment(client: AxiamClient, password: string): Promise<OpaqueEnrollment>;
242
215
 
243
216
  /**
244
217
  * The main entry point for the AXIAM TypeScript/JavaScript SDK — an
@@ -332,21 +305,36 @@ declare class AxiamClient {
332
305
  /** `POST /api/v1/auth/login` (§1, D-18). */
333
306
  login(email: string, password: string): Promise<LoginResult>;
334
307
  /**
335
- * SRP-6a login (§23) — the password never leaves this process.
308
+ * OPAQUE login (§23) — the password never leaves this process.
336
309
  *
337
310
  * Returns the same `LoginResult` as {@link login}, including the
338
311
  * `mfa_required` branch, so one result handler serves both. Rejects with a
339
- * `NetworkError` naming SRP when the tenant has it disabled, so a caller can
340
- * fall back to {@link login} rather than mistaking it for a bad password.
312
+ * `NetworkError` naming OPAQUE when the tenant has it disabled, so a caller
313
+ * can fall back to {@link login} rather than mistaking it for a bad password.
314
+ *
315
+ * **Only that case may fall back.** Any other rejection is a failed login,
316
+ * and retrying it over {@link login} would hand the plaintext to a server
317
+ * that just failed to prove it holds the record.
341
318
  */
342
- loginSrp(usernameOrEmail: string, password: string): Promise<LoginResult>;
319
+ loginOpaque(usernameOrEmail: string, password: string): Promise<LoginResult>;
343
320
  /**
344
- * Compute an SRP verifier to send with any request that sets a password
345
- * (§23). The server cannot derive one — it never sees the plaintext.
321
+ * Build an OPAQUE registration record to send with any request that sets a
322
+ * password (§23). The server cannot build one — it never sees the plaintext.
323
+ *
324
+ * Asynchronous because it performs a `register/start` round trip: the
325
+ * envelope is sealed under the server's oblivious PRF, so unlike the SRP
326
+ * verifier this replaces there is no offline computation that produces a
327
+ * valid record.
328
+ */
329
+ opaqueEnrollment(password: string): Promise<OpaqueEnrollment>;
330
+ /**
331
+ * Whether this installation can perform OPAQUE (§23.2).
332
+ *
333
+ * Asynchronous, and genuinely able to answer `false`: `@axiam/opaque-wasm` is
334
+ * an optional peer dependency, so an installation that skipped it reports
335
+ * rather than throwing at login time.
346
336
  */
347
- srpEnrollment(options: SrpEnrollmentOptions): Promise<SrpEnrollment>;
348
- /** Whether this runtime can perform SRP (§23.1). Always true here. */
349
- srpAvailable(): boolean;
337
+ opaqueAvailable(): Promise<boolean>;
350
338
  /** `POST /api/v1/auth/mfa/verify` (§1, D-18). Completes the two-phase flow started by login(). */
351
339
  verifyMfa(mfaToken: string, code: string): Promise<LoginResult>;
352
340
  /** `POST /api/v1/auth/refresh` (§1). Usually driven reactively by the response interceptor (D-07). */
@@ -361,4 +349,4 @@ declare class AxiamClient {
361
349
  batchCheck(checks: AccessCheck[]): Promise<AccessDecision[]>;
362
350
  }
363
351
 
364
- export { AxiamClient as A, BASE_DELAY_MS as B, DecisionMemo as D, type FinishRequest as F, MAX_ATTEMPTS as M, type RetryOptions as R, type SrpEnrollment as S, TelemetryReporter as T, MAX_DELAY_MS as a, MAX_TTL_MS as b, type SrpEnrollmentOptions as c, backoffMs as d, delayMs as e, srpEnrollment as f, memoKey as m, srpAvailable as s, withRetry as w };
352
+ export { AxiamClient as A, BASE_DELAY_MS as B, DecisionMemo as D, type FinishRequest as F, MAX_ATTEMPTS as M, type OpaqueEnrollment as O, type RetryOptions as R, TelemetryReporter as T, MAX_DELAY_MS as a, MAX_TTL_MS as b, backoffMs as c, delayMs as d, memoKey as m, opaqueEnrollment as o, withRetry as w };
@@ -1,6 +1,6 @@
1
1
  import { CookieJar } from 'tough-cookie';
2
2
  import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-CMgYRxLP.cjs';
3
- import { A as AxiamClient } from './client-Dz_AJfW7.cjs';
3
+ import { A as AxiamClient } from './client-BI8psWTI.cjs';
4
4
  import { S as Sensitive } from './sensitive-BC_s7Rrd.cjs';
5
5
  import { V as Verifier } from './jwks-CSXHo3DS.cjs';
6
6
  import { AxiosInstance } from 'axios';
@@ -1,6 +1,6 @@
1
1
  import { CookieJar } from 'tough-cookie';
2
2
  import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-BJHqprWm.js';
3
- import { A as AxiamClient } from './client-Cai8IhUV.js';
3
+ import { A as AxiamClient } from './client-BLxvE44W.js';
4
4
  import { S as Sensitive } from './sensitive-BC_s7Rrd.js';
5
5
  import { V as Verifier } from './jwks-CSXHo3DS.js';
6
6
  import { AxiosInstance } from 'axios';
@@ -1,14 +1,14 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
2
  import { Interceptor } from '@grpc/grpc-js';
3
- import { N as NodeSession } from '../cookieJar-Dk9eqU4i.cjs';
4
- export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-Dk9eqU4i.cjs';
3
+ import { N as NodeSession } from '../cookieJar-CtSD0jwR.cjs';
4
+ export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-CtSD0jwR.cjs';
5
5
  import { a as AccessDecision } from '../types-CO10Ainw.cjs';
6
6
  export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CSXHo3DS.cjs';
7
7
  import 'tough-cookie';
8
8
  import '../session-CMgYRxLP.cjs';
9
9
  import 'axios';
10
10
  import '../telemetry-DrGqL4kb.cjs';
11
- import '../client-Dz_AJfW7.cjs';
11
+ import '../client-BI8psWTI.cjs';
12
12
  import '../sensitive-BC_s7Rrd.cjs';
13
13
 
14
14
  /**
@@ -1,14 +1,14 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
2
  import { Interceptor } from '@grpc/grpc-js';
3
- import { N as NodeSession } from '../cookieJar-z_5x601f.js';
4
- export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-z_5x601f.js';
3
+ import { N as NodeSession } from '../cookieJar-b1B10RCK.js';
4
+ export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-b1B10RCK.js';
5
5
  import { a as AccessDecision } from '../types-CO10Ainw.js';
6
6
  export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CSXHo3DS.js';
7
7
  import 'tough-cookie';
8
8
  import '../session-BJHqprWm.js';
9
9
  import 'axios';
10
10
  import '../telemetry-DrGqL4kb.js';
11
- import '../client-Cai8IhUV.js';
11
+ import '../client-BLxvE44W.js';
12
12
  import '../sensitive-BC_s7Rrd.js';
13
13
 
14
14
  /**