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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Request, RequestHandler, Router } from 'express';
|
|
2
2
|
import { a as AuthzLogger, E as ErrorBody, b as AxiamIdentity, V as VerifiableSession, A as AuthzVerifiableSession, c as ResourceSpec, R as RequireAccessOptions } from '../authzCore-BQfX9qxN.cjs';
|
|
3
3
|
export { d as AuthzChecker, C as CheckOutcome, e as ResourceParamRef, f as ResourceResolutionError, g as ResourceResolver, U as UmaChallenger, h as UmaTicketMinter, i as assertAuthzClient, j as authenticateRequest, k as evaluateAccess, l as fromParam, m as hasAnyRole, r as resolveResourceId } from '../authzCore-BQfX9qxN.cjs';
|
|
4
|
-
import { P as OidcClient, W as OidcStateStore, X as OidcTokenSet, V as OidcStateEntry } from '../oidcState-
|
|
5
|
-
export { a as AuthorizationRequest, c as CibaAwaitParams, d as CibaClock, e as CibaDelivery, f as CibaInitiateParams, g as CibaInitiateResponse, h as CibaPingHeaders, i as CibaPollParams, j as CibaRequestSigner, k as CibaSignerDescription, l as CibaSigningAlg, m as CibaSigningKey, n as CibaUserHint, r as DeviceAuthorization, s as DeviceAuthorizeParams, t as DeviceLoginParams, u as DevicePollParams, E as ExchangedToken, F as FederationProvider, v as FederationProviderList, H as HANDOFF_CODE_TTL_SECS, w as HANDOFF_QUERY_PARAM, I as IntrospectParams, x as IntrospectionResult, L as LoginClientCredentialsParams, y as LogoutUrlParams, z as MIN_DISCOVERY_TTL_MS, G as MemoryOidcStateStore, K as MtlsEndpointAliases, O as OIDC_STATE_TTL_MS, N as OidcBeginParams, Q as OidcClientOptions, R as OidcConfiguration, S as OidcExchangeParams, T as OidcParParams, U as OidcRefreshParams, Y as PROTOCOL_OAUTH2, Z as PROTOCOL_OIDC_CONNECT, _ as PROTOCOL_SAML, a0 as PushedAuthorizationRequest, a1 as RequestedPermission, a2 as RequestingPartyToken, a3 as ResourceSet, a4 as RevokeParams, ae as SsoCompleteHandoffParams, af as SsoCompleteOauth2Params, ag as SsoCompleteParams, ah as SsoCompleteResult, ai as SsoProvidersParams, aj as SsoStartOauth2Params, ak as SsoStartParams, al as SsoStartResult, an as TokenExchangeParams, as as UmaExchangeTicketParams, at as VerifiedLogoutToken, au as createOidcClient, av as isAccessDenied, aw as isExpiredToken } from '../oidcState-
|
|
4
|
+
import { P as OidcClient, W as OidcStateStore, X as OidcTokenSet, V as OidcStateEntry } from '../oidcState-Cz6erz0g.cjs';
|
|
5
|
+
export { a as AuthorizationRequest, c as CibaAwaitParams, d as CibaClock, e as CibaDelivery, f as CibaInitiateParams, g as CibaInitiateResponse, h as CibaPingHeaders, i as CibaPollParams, j as CibaRequestSigner, k as CibaSignerDescription, l as CibaSigningAlg, m as CibaSigningKey, n as CibaUserHint, r as DeviceAuthorization, s as DeviceAuthorizeParams, t as DeviceLoginParams, u as DevicePollParams, E as ExchangedToken, F as FederationProvider, v as FederationProviderList, H as HANDOFF_CODE_TTL_SECS, w as HANDOFF_QUERY_PARAM, I as IntrospectParams, x as IntrospectionResult, L as LoginClientCredentialsParams, y as LogoutUrlParams, z as MIN_DISCOVERY_TTL_MS, G as MemoryOidcStateStore, K as MtlsEndpointAliases, O as OIDC_STATE_TTL_MS, N as OidcBeginParams, Q as OidcClientOptions, R as OidcConfiguration, S as OidcExchangeParams, T as OidcParParams, U as OidcRefreshParams, Y as PROTOCOL_OAUTH2, Z as PROTOCOL_OIDC_CONNECT, _ as PROTOCOL_SAML, a0 as PushedAuthorizationRequest, a1 as RequestedPermission, a2 as RequestingPartyToken, a3 as ResourceSet, a4 as RevokeParams, ae as SsoCompleteHandoffParams, af as SsoCompleteOauth2Params, ag as SsoCompleteParams, ah as SsoCompleteResult, ai as SsoProvidersParams, aj as SsoStartOauth2Params, ak as SsoStartParams, al as SsoStartResult, an as TokenExchangeParams, as as UmaExchangeTicketParams, at as VerifiedLogoutToken, au as createOidcClient, av as isAccessDenied, aw as isExpiredToken } from '../oidcState-Cz6erz0g.cjs';
|
|
6
6
|
import { FastifyRequest, FastifyReply, FastifyPluginAsync, FastifyInstance } from 'fastify';
|
|
7
|
-
export { F as FieldError, V as ValidationError } from '../errors-
|
|
7
|
+
export { F as FieldError, V as ValidationError } from '../errors-CtP_lviy.cjs';
|
|
8
8
|
import { P as PresentedProofs } from '../jwks-BR55d7-Z.cjs';
|
|
9
9
|
export { a as AccessTokenExpectations, A as AxiamClaims, b as CLOCK_SKEW_LEEWAY_SEC, C as CnfClaim, I as IdTokenClaims, V as Verifier, h as assertTenantClaim, i as certificateThumbprintS256, v as verifyCertificateBinding, k as verifyTokenBinding } from '../jwks-BR55d7-Z.cjs';
|
|
10
10
|
export { D as DEFAULT_POLL_INTERVAL_MS, M as MAX_ENTRIES, a as MIN_POLL_INTERVAL_MS, R as RevocationFeed, b as RevocationFeedOptions } from '../revocationFeed-CDoD7Twr.cjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Request, RequestHandler, Router } from 'express';
|
|
2
2
|
import { a as AuthzLogger, E as ErrorBody, b as AxiamIdentity, V as VerifiableSession, A as AuthzVerifiableSession, c as ResourceSpec, R as RequireAccessOptions } from '../authzCore-BlSHwGnW.js';
|
|
3
3
|
export { d as AuthzChecker, C as CheckOutcome, e as ResourceParamRef, f as ResourceResolutionError, g as ResourceResolver, U as UmaChallenger, h as UmaTicketMinter, i as assertAuthzClient, j as authenticateRequest, k as evaluateAccess, l as fromParam, m as hasAnyRole, r as resolveResourceId } from '../authzCore-BlSHwGnW.js';
|
|
4
|
-
import { P as OidcClient, W as OidcStateStore, X as OidcTokenSet, V as OidcStateEntry } from '../oidcState-
|
|
5
|
-
export { a as AuthorizationRequest, c as CibaAwaitParams, d as CibaClock, e as CibaDelivery, f as CibaInitiateParams, g as CibaInitiateResponse, h as CibaPingHeaders, i as CibaPollParams, j as CibaRequestSigner, k as CibaSignerDescription, l as CibaSigningAlg, m as CibaSigningKey, n as CibaUserHint, r as DeviceAuthorization, s as DeviceAuthorizeParams, t as DeviceLoginParams, u as DevicePollParams, E as ExchangedToken, F as FederationProvider, v as FederationProviderList, H as HANDOFF_CODE_TTL_SECS, w as HANDOFF_QUERY_PARAM, I as IntrospectParams, x as IntrospectionResult, L as LoginClientCredentialsParams, y as LogoutUrlParams, z as MIN_DISCOVERY_TTL_MS, G as MemoryOidcStateStore, K as MtlsEndpointAliases, O as OIDC_STATE_TTL_MS, N as OidcBeginParams, Q as OidcClientOptions, R as OidcConfiguration, S as OidcExchangeParams, T as OidcParParams, U as OidcRefreshParams, Y as PROTOCOL_OAUTH2, Z as PROTOCOL_OIDC_CONNECT, _ as PROTOCOL_SAML, a0 as PushedAuthorizationRequest, a1 as RequestedPermission, a2 as RequestingPartyToken, a3 as ResourceSet, a4 as RevokeParams, ae as SsoCompleteHandoffParams, af as SsoCompleteOauth2Params, ag as SsoCompleteParams, ah as SsoCompleteResult, ai as SsoProvidersParams, aj as SsoStartOauth2Params, ak as SsoStartParams, al as SsoStartResult, an as TokenExchangeParams, as as UmaExchangeTicketParams, at as VerifiedLogoutToken, au as createOidcClient, av as isAccessDenied, aw as isExpiredToken } from '../oidcState-
|
|
4
|
+
import { P as OidcClient, W as OidcStateStore, X as OidcTokenSet, V as OidcStateEntry } from '../oidcState-zGt6VU6v.js';
|
|
5
|
+
export { a as AuthorizationRequest, c as CibaAwaitParams, d as CibaClock, e as CibaDelivery, f as CibaInitiateParams, g as CibaInitiateResponse, h as CibaPingHeaders, i as CibaPollParams, j as CibaRequestSigner, k as CibaSignerDescription, l as CibaSigningAlg, m as CibaSigningKey, n as CibaUserHint, r as DeviceAuthorization, s as DeviceAuthorizeParams, t as DeviceLoginParams, u as DevicePollParams, E as ExchangedToken, F as FederationProvider, v as FederationProviderList, H as HANDOFF_CODE_TTL_SECS, w as HANDOFF_QUERY_PARAM, I as IntrospectParams, x as IntrospectionResult, L as LoginClientCredentialsParams, y as LogoutUrlParams, z as MIN_DISCOVERY_TTL_MS, G as MemoryOidcStateStore, K as MtlsEndpointAliases, O as OIDC_STATE_TTL_MS, N as OidcBeginParams, Q as OidcClientOptions, R as OidcConfiguration, S as OidcExchangeParams, T as OidcParParams, U as OidcRefreshParams, Y as PROTOCOL_OAUTH2, Z as PROTOCOL_OIDC_CONNECT, _ as PROTOCOL_SAML, a0 as PushedAuthorizationRequest, a1 as RequestedPermission, a2 as RequestingPartyToken, a3 as ResourceSet, a4 as RevokeParams, ae as SsoCompleteHandoffParams, af as SsoCompleteOauth2Params, ag as SsoCompleteParams, ah as SsoCompleteResult, ai as SsoProvidersParams, aj as SsoStartOauth2Params, ak as SsoStartParams, al as SsoStartResult, an as TokenExchangeParams, as as UmaExchangeTicketParams, at as VerifiedLogoutToken, au as createOidcClient, av as isAccessDenied, aw as isExpiredToken } from '../oidcState-zGt6VU6v.js';
|
|
6
6
|
import { FastifyRequest, FastifyReply, FastifyPluginAsync, FastifyInstance } from 'fastify';
|
|
7
|
-
export { F as FieldError, V as ValidationError } from '../errors-
|
|
7
|
+
export { F as FieldError, V as ValidationError } from '../errors-VpViVRSx.js';
|
|
8
8
|
import { P as PresentedProofs } from '../jwks-BR55d7-Z.js';
|
|
9
9
|
export { a as AccessTokenExpectations, A as AxiamClaims, b as CLOCK_SKEW_LEEWAY_SEC, C as CnfClaim, I as IdTokenClaims, V as Verifier, h as assertTenantClaim, i as certificateThumbprintS256, v as verifyCertificateBinding, k as verifyTokenBinding } from '../jwks-BR55d7-Z.js';
|
|
10
10
|
export { D as DEFAULT_POLL_INTERVAL_MS, M as MAX_ENTRIES, a as MIN_POLL_INTERVAL_MS, R as RevocationFeed, b as RevocationFeedOptions } from '../revocationFeed-CDoD7Twr.js';
|
package/dist/middleware/index.js
CHANGED
|
@@ -2294,9 +2294,21 @@ var OidcClient = class {
|
|
|
2294
2294
|
* and obtain the code pair.
|
|
2295
2295
|
*
|
|
2296
2296
|
* @remarks
|
|
2297
|
-
* **
|
|
2298
|
-
*
|
|
2299
|
-
*
|
|
2297
|
+
* **The client authenticates as it does at every other token request
|
|
2298
|
+
* (contract 1.62, §14.1 rule 2).** A client built with a `clientSecret` sends
|
|
2299
|
+
* it as `client_secret` in the **form body** — never as `Authorization:
|
|
2300
|
+
* Basic`, whatever the client is registered for (§12.1 rule 3 stands for
|
|
2301
|
+
* this route, and the maintainer's 2026-10-16 "same rules" reading fixes the
|
|
2302
|
+
* form body) — and a client with a §6.1 client certificate presents it on the
|
|
2303
|
+
* connection, through the `mtls_endpoint_aliases` entry when discovery
|
|
2304
|
+
* publishes one (§21.3). **A public client sends no credential at all** and
|
|
2305
|
+
* is never refused client-side, so a device that cannot hold a secret still
|
|
2306
|
+
* works. The SDK sends a credential only when its caller configured one: it
|
|
2307
|
+
* never borrows one from another configuration. `private_key_jwt` client
|
|
2308
|
+
* authentication is not implemented by this SDK.
|
|
2309
|
+
*
|
|
2310
|
+
* A `401` with `{"error":"invalid_client"}` is an {@link OAuthProtocolError}
|
|
2311
|
+
* (§14.2 rule 5), is made once, and does not enter the §9 refresh guard.
|
|
2300
2312
|
*/
|
|
2301
2313
|
async deviceAuthorize(params = {}) {
|
|
2302
2314
|
const configuration = params.configuration ?? await this.oidcDiscover();
|
|
@@ -2308,6 +2320,7 @@ var OidcClient = class {
|
|
|
2308
2320
|
}
|
|
2309
2321
|
const form = new URLSearchParams();
|
|
2310
2322
|
form.set("client_id", this.#options.clientId);
|
|
2323
|
+
this.#appendClientSecret(form);
|
|
2311
2324
|
if (params.scope !== void 0) {
|
|
2312
2325
|
form.set("scope", Array.isArray(params.scope) ? params.scope.join(" ") : params.scope);
|
|
2313
2326
|
}
|
|
@@ -2418,6 +2431,15 @@ var OidcClient = class {
|
|
|
2418
2431
|
* {@link OAuthProtocolError} — `authorization_pending` and `slow_down`
|
|
2419
2432
|
* included — so a hand-rolled loop sees exactly what {@link deviceLogin}
|
|
2420
2433
|
* sees. Most callers want {@link deviceLogin}.
|
|
2434
|
+
*
|
|
2435
|
+
* Client authentication is the one {@link deviceAuthorize} describes
|
|
2436
|
+
* (contract 1.62, §14.1 rule 2): a configured `clientSecret` is sent as
|
|
2437
|
+
* `client_secret` in the form body, never as `Authorization: Basic`; a public
|
|
2438
|
+
* client sends none; `client_id` is sent on **every** poll (§14.1 rule 3). A
|
|
2439
|
+
* `401 invalid_client` surfaces as {@link OAuthProtocolError}, is not retried
|
|
2440
|
+
* and does not enter the §9 refresh guard (§14.2 rule 5). This SDK ships no
|
|
2441
|
+
* DPoP proof generator, so it cannot drive a client registered for DPoP; it
|
|
2442
|
+
* surfaces that client's refusal as the same `invalid_client`.
|
|
2421
2443
|
*/
|
|
2422
2444
|
async devicePoll(params) {
|
|
2423
2445
|
const configuration = params.configuration ?? await this.oidcDiscover();
|
|
@@ -2425,6 +2447,7 @@ var OidcClient = class {
|
|
|
2425
2447
|
form.set("grant_type", DEVICE_CODE_GRANT_TYPE);
|
|
2426
2448
|
form.set("device_code", exposeSecret(params.deviceCode));
|
|
2427
2449
|
form.set("client_id", this.#options.clientId);
|
|
2450
|
+
this.#appendClientSecret(form);
|
|
2428
2451
|
const wire = await this.#postToken(configuration, form, params.tenantId);
|
|
2429
2452
|
return this.#toTokenSet(wire, configuration, void 0);
|
|
2430
2453
|
}
|