Generated reference / v1

TypeScript SDK

Versioned contracts generated from actual source.

Generated with the official TypeScript compiler API from both Node and browser entrypoints. Browser integrations must use @beyondigital/auth-sdk/browser. SDK version 0.1.0. Runnable examples are validated separately with synthetic local services.

@beyondigital/auth-sdk

accessPolicyfunction

Access-token policy: `type === "access"` + sub/exp/iat + `at+jwt` typ.

{
  "name": "accessPolicy",
  "kind": "function",
  "description": "Access-token policy: `type === \"access\"` + sub/exp/iat + `at+jwt` typ.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 42
  },
  "type": "() => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): ValidationPolicy",
      "description": "Access-token policy: `type === \"access\"` + sub/exp/iat + `at+jwt` typ.",
      "parameters": [],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
AccessTokenClaimsinterface
{
  "name": "AccessTokenClaims",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 108
  },
  "type": "AccessTokenClaims",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "app",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "aud",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "auth_user_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "central_user_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "exp",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "iat",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "identity_class",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "is_system_admin",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "iss",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "permissions_version",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "session_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sub",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_version",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "type",
      "optional": false,
      "type": "\"access\"",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
AccessTokenVerifierinterface

Anything that verifies an access token — what the middleware needs. Both `TokenVerifier` and `MultiIssuerVerifier` satisfy it.

{
  "name": "AccessTokenVerifier",
  "kind": "interface",
  "description": "Anything that verifies an access token — what the middleware needs. Both\n`TokenVerifier` and `MultiIssuerVerifier` satisfy it.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 57
  },
  "type": "AccessTokenVerifier",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "verify",
      "optional": false,
      "type": "(token: string, opts?: VerifyOptions) => Promise<CurrentUser>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts?: VerifyOptions): Promise<CurrentUser>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyOptions | undefined",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CurrentUser>"
        }
      ]
    }
  ]
}
Accountinterface
{
  "name": "Account",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 241
  },
  "type": "Account",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "billing_email",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "created_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "role",
      "optional": false,
      "type": "\"owner\" | \"admin\" | \"developer\" | \"billing\" | \"readonly\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "slug",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "updated_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
allowLegacyTypfunction

Compat window for pre-WP-03b access tokens with no `typ` header.

{
  "name": "allowLegacyTyp",
  "kind": "function",
  "description": "Compat window for pre-WP-03b access tokens with no `typ` header.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 72
  },
  "type": "(policy: ValidationPolicy) => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(policy: ValidationPolicy): ValidationPolicy",
      "description": "Compat window for pre-WP-03b access tokens with no `typ` header.",
      "parameters": [
        {
          "name": "policy",
          "type": "ValidationPolicy",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
Applicationinterface
{
  "name": "Application",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 252
  },
  "type": "Application",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "account_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "slug",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
assertDpopSupportedfunction

The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.

{
  "name": "assertDpopSupported",
  "kind": "function",
  "description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 122
  },
  "type": "(metadata: { dpop_signing_alg_values_supported?: string[]; }, key: DpopKey) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(metadata: { dpop_signing_alg_values_supported?: string[]; }, key: DpopKey): void",
      "description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.",
      "parameters": [
        {
          "name": "metadata",
          "type": "{ dpop_signing_alg_values_supported?: string[]; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
AuthenticatedUserinterface
{
  "name": "AuthenticatedUser",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 163
  },
  "type": "AuthenticatedUser",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "app",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "auth_user_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "firm_id",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "full_name",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
BACKCHANNEL_LOGOUT_EVENTvalue
{
  "name": "BACKCHANNEL_LOGOUT_EVENT",
  "kind": "value",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 15
  },
  "type": "\"http://schemas.openid.net/event/backchannel-logout\"",
  "constructors": [],
  "signatures": [],
  "properties": []
}
base64UrlEncodefunction
{
  "name": "base64UrlEncode",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth.ts",
    "line": 19
  },
  "type": "(buf: Buffer | Uint8Array) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(buf: Buffer | Uint8Array): string",
      "description": "",
      "parameters": [
        {
          "name": "buf",
          "type": "Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
BeyondigitalAuthClientclass
{
  "name": "BeyondigitalAuthClient",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client.ts",
    "line": 51
  },
  "type": "typeof BeyondigitalAuthClient",
  "constructors": [
    {
      "signature": "new (config: SdkConfig): BeyondigitalAuthClient",
      "description": "",
      "parameters": [
        {
          "name": "config",
          "type": "SdkConfig",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "BeyondigitalAuthClient"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "clientCredentials",
      "optional": false,
      "type": "(opts: { scope?: string; resource: string | string[]; clientId?: string; clientSecret?: string; }) => Promise<TokenResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { scope?: string; resource: string | string[]; clientId?: string; clientSecret?: string; }): Promise<TokenResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ scope?: string; resource: string | string[]; clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "createAuthorizationUrl",
      "optional": false,
      "type": "(opts: CreateAuthUrlOpts) => string",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: CreateAuthUrlOpts): string",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "CreateAuthUrlOpts",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "createAuthorizationUrlFromRequestUri",
      "optional": false,
      "type": "(requestUri: string) => string",
      "description": "The authorize URL for a pushed request: `client_id` and `request_uri` only.",
      "tags": [],
      "signatures": [
        {
          "signature": "(requestUri: string): string",
          "description": "The authorize URL for a pushed request: `client_id` and `request_uri` only.",
          "parameters": [
            {
              "name": "requestUri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "createEndSessionUrl",
      "optional": false,
      "type": "(opts?: { idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }) => string",
      "description": "The URL to send the person's browser to in order to end their session. Uses the discovered\n`end_session_endpoint` when it is on the issuer's origin, `<issuer>/oauth/end_session` otherwise.\nThe service redirects to `postLogoutRedirectUri` only for an `idTokenHint` that names a client\nfor which that URI is registered.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts?: { idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }): string",
          "description": "The URL to send the person's browser to in order to end their session. Uses the discovered\n`end_session_endpoint` when it is on the issuer's origin, `<issuer>/oauth/end_session` otherwise.\nThe service redirects to `postLogoutRedirectUri` only for an `idTokenHint` that names a client\nfor which that URI is registered.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "deviceLogin",
      "optional": false,
      "type": "(opts: { scope?: string; resource?: string | string[]; onUserCode: (device: DeviceAuthorization) => void | Promise<void>; } & DevicePollOptions) => Promise<TokenResponse>",
      "description": "`startDeviceAuthorization`, hand the codes to `onUserCode`, then `pollDeviceToken`.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { scope?: string; resource?: string | string[]; onUserCode: (device: DeviceAuthorization) => void | Promise<void>; } & DevicePollOptions): Promise<TokenResponse>",
          "description": "`startDeviceAuthorization`, hand the codes to `onUserCode`, then `pollDeviceToken`.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ scope?: string; resource?: string | string[]; onUserCode: (device: DeviceAuthorization) => void | Promise<void>; } & DevicePollOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "discover",
      "optional": false,
      "type": "() => Promise<OidcMetadata>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): Promise<OidcMetadata>",
          "description": "",
          "parameters": [],
          "returns": "Promise<OidcMetadata>"
        }
      ]
    },
    {
      "name": "discoverOAuth",
      "optional": false,
      "type": "() => Promise<OidcMetadata>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): Promise<OidcMetadata>",
          "description": "",
          "parameters": [],
          "returns": "Promise<OidcMetadata>"
        }
      ]
    },
    {
      "name": "dpopHeaders",
      "optional": false,
      "type": "(request: { accessToken: string; method: string; url: string; }) => Promise<Record<string, string>>",
      "description": "The `Authorization: DPoP <token>` and `DPoP: <proof>` headers for a request to any resource\nserver, with the proof bound to the token (`ath`), the method and the URL (query and fragment\nexcluded). Needs the `dpop` key. Call once per request: a proof is single use.",
      "tags": [],
      "signatures": [
        {
          "signature": "(request: { accessToken: string; method: string; url: string; }): Promise<Record<string, string>>",
          "description": "The `Authorization: DPoP <token>` and `DPoP: <proof>` headers for a request to any resource\nserver, with the proof bound to the token (`ath`), the method and the URL (query and fragment\nexcluded). Needs the `dpop` key. Call once per request: a proof is single use.",
          "parameters": [
            {
              "name": "request",
              "type": "{ accessToken: string; method: string; url: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, string>>"
        }
      ]
    },
    {
      "name": "exchangeCode",
      "optional": false,
      "type": "(opts: { code: string; codeVerifier: string; redirectUri?: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }) => Promise<TokenResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { code: string; codeVerifier: string; redirectUri?: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }): Promise<TokenResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ code: string; codeVerifier: string; redirectUri?: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "exchangeToken",
      "optional": false,
      "type": "(opts: { subjectToken: string; subjectTokenType?: string; actorToken?: string; actorTokenType?: string; requestedTokenType?: string; scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }) => Promise<TokenResponse>",
      "description": "Exchange an access token for a delegated one (the service's delegation grants decide whether it\nmay). `subjectToken` is the delegator's access token; `actorToken` the acting party's. The token\ntypes default to the only one the service supports. Never carries a DPoP proof: the service\naccepts one for the code and refresh grants only.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { subjectToken: string; subjectTokenType?: string; actorToken?: string; actorTokenType?: string; requestedTokenType?: string; scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }): Promise<TokenResponse>",
          "description": "Exchange an access token for a delegated one (the service's delegation grants decide whether it\nmay). `subjectToken` is the delegator's access token; `actorToken` the acting party's. The token\ntypes default to the only one the service supports. Never carries a DPoP proof: the service\naccepts one for the code and refresh grants only.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ subjectToken: string; subjectTokenType?: string; actorToken?: string; actorTokenType?: string; requestedTokenType?: string; scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "health",
      "optional": false,
      "type": "() => Promise<{ status: string; }>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): Promise<{ status: string; }>",
          "description": "",
          "parameters": [],
          "returns": "Promise<{ status: string; }>"
        }
      ]
    },
    {
      "name": "introspect",
      "optional": false,
      "type": "(opts: { token: string; audience: string; clientId?: string; clientSecret?: string; }) => Promise<IntrospectionResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { token: string; audience: string; clientId?: string; clientSecret?: string; }): Promise<IntrospectionResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ token: string; audience: string; clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<IntrospectionResponse>"
        }
      ]
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwks",
      "optional": false,
      "type": "() => Promise<JwksResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): Promise<JwksResponse>",
          "description": "",
          "parameters": [],
          "returns": "Promise<JwksResponse>"
        }
      ]
    },
    {
      "name": "pollDeviceToken",
      "optional": false,
      "type": "(device: DeviceAuthorization, options?: DevicePollOptions & { clientId?: string; clientSecret?: string; }) => Promise<TokenResponse>",
      "description": "Poll the token endpoint until the person approves: waits the interval before each poll, adds five\nseconds after `slow_down`, and stops with the service's error for `access_denied`, `expired_token`\nor anything else (and with `expired_token` once the device code's own lifetime would pass).\nPass `signal` to cancel. A network failure is thrown, not retried; call again with the same\nauthorization to resume.",
      "tags": [],
      "signatures": [
        {
          "signature": "(device: DeviceAuthorization, options?: DevicePollOptions & { clientId?: string; clientSecret?: string; }): Promise<TokenResponse>",
          "description": "Poll the token endpoint until the person approves: waits the interval before each poll, adds five\nseconds after `slow_down`, and stops with the service's error for `access_denied`, `expired_token`\nor anything else (and with `expired_token` once the device code's own lifetime would pass).\nPass `signal` to cancel. A network failure is thrown, not retried; call again with the same\nauthorization to resume.",
          "parameters": [
            {
              "name": "device",
              "type": "DeviceAuthorization",
              "optional": false,
              "description": ""
            },
            {
              "name": "options",
              "type": "DevicePollOptions & { clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "pushAuthorizationRequest",
      "optional": false,
      "type": "(opts: PushAuthorizationOptions & { clientId?: string; clientSecret?: string; }) => Promise<PushedAuthorization>",
      "description": "Send the authorize parameters to the service directly and get a one-use `request_uri` back, so\nthe browser carries nothing the person could read or edit. Authenticates like the token endpoint.\nThen redirect to `createAuthorizationUrlFromRequestUri(result.request_uri)`.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: PushAuthorizationOptions & { clientId?: string; clientSecret?: string; }): Promise<PushedAuthorization>",
          "description": "Send the authorize parameters to the service directly and get a one-use `request_uri` back, so\nthe browser carries nothing the person could read or edit. Authenticates like the token endpoint.\nThen redirect to `createAuthorizationUrlFromRequestUri(result.request_uri)`.",
          "parameters": [
            {
              "name": "opts",
              "type": "PushAuthorizationOptions & { clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<PushedAuthorization>"
        }
      ]
    },
    {
      "name": "refresh",
      "optional": false,
      "type": "(opts: { refreshToken: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }) => Promise<TokenResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { refreshToken: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }): Promise<TokenResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ refreshToken: string; clientId?: string; clientSecret?: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "register",
      "optional": false,
      "type": "(opts: { clientName?: string; redirectUris: string[]; scope?: string; grantTypes?: string[]; responseTypes?: string[]; tokenEndpointAuthMethod?: \"none\" | \"client_secret_post\" | \"client_secret_basic\"; clientUri?: string; logoUri?: string; applicationType?: \"web\" | \"native\"; }) => Promise<{ client_id: string; client_secret?: string; } & Record<string, unknown>>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { clientName?: string; redirectUris: string[]; scope?: string; grantTypes?: string[]; responseTypes?: string[]; tokenEndpointAuthMethod?: \"none\" | \"client_secret_post\" | \"client_secret_basic\"; clientUri?: string; logoUri?: string; applicationType?: \"web\" | \"native\"; }): Promise<{ client_id: string; client_secret?: string; } & Record<string, unknown>>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ clientName?: string; redirectUris: string[]; scope?: string; grantTypes?: string[]; responseTypes?: string[]; tokenEndpointAuthMethod?: \"none\" | \"client_secret_post\" | \"client_secret_basic\"; clientUri?: string; logoUri?: string; applicationType?: \"web\" | \"native\"; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<{ client_id: string; client_secret?: string; } & Record<string, unknown>>"
        }
      ]
    },
    {
      "name": "revoke",
      "optional": false,
      "type": "(token: string) => Promise<void>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Promise<void>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<void>"
        }
      ]
    },
    {
      "name": "startDeviceAuthorization",
      "optional": false,
      "type": "(opts?: { scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }) => Promise<DeviceAuthorization>",
      "description": "Ask for a device code and a user code. Show `user_code` and `verification_uri` (or\n`verification_uri_complete`, for a QR code) to the person, then call `pollDeviceToken`.\nThe client must be registered for the device_code grant; a confidential client authenticates\nwith its secret (`private_key_jwt` is not accepted at this endpoint by the service).",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts?: { scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }): Promise<DeviceAuthorization>",
          "description": "Ask for a device code and a user code. Show `user_code` and `verification_uri` (or\n`verification_uri_complete`, for a QR code) to the person, then call `pollDeviceToken`.\nThe client must be registered for the device_code grant; a confidential client authenticates\nwith its secret (`private_key_jwt` is not accepted at this endpoint by the service).",
          "parameters": [
            {
              "name": "opts",
              "type": "{ scope?: string; resource?: string | string[]; clientId?: string; clientSecret?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<DeviceAuthorization>"
        }
      ]
    },
    {
      "name": "userinfo",
      "optional": false,
      "type": "(accessToken: string, opts?: { tokenType?: \"Bearer\" | \"DPoP\"; }) => Promise<UserInfoResponse>",
      "description": "`tokenType: \"DPoP\"` for a token issued with a DPoP proof: sent under the DPoP scheme with a proof bound to it.",
      "tags": [],
      "signatures": [
        {
          "signature": "(accessToken: string, opts?: { tokenType?: \"Bearer\" | \"DPoP\"; }): Promise<UserInfoResponse>",
          "description": "`tokenType: \"DPoP\"` for a token issued with a DPoP proof: sent under the DPoP scheme with a proof bound to it.",
          "parameters": [
            {
              "name": "accessToken",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "{ tokenType?: \"Bearer\" | \"DPoP\"; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<UserInfoResponse>"
        }
      ]
    },
    {
      "name": "withVerifier",
      "optional": false,
      "type": "(opts: { audience: string | string[]; jwksCacheTtlSec?: number; }) => TokenVerifier",
      "description": "Attach a verifier that will auto-use this client's discovered jwks_uri",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { audience: string | string[]; jwksCacheTtlSec?: number; }): TokenVerifier",
          "description": "Attach a verifier that will auto-use this client's discovered jwks_uri",
          "parameters": [
            {
              "name": "opts",
              "type": "{ audience: string | string[]; jwksCacheTtlSec?: number; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "TokenVerifier"
        }
      ]
    }
  ]
}
buildAuthorizationUrlfunction
{
  "name": "buildAuthorizationUrl",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 31
  },
  "type": "(params: AuthorizationUrlParams) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(params: AuthorizationUrlParams): string",
      "description": "",
      "parameters": [
        {
          "name": "params",
          "type": "AuthorizationUrlParams",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
buildAuthorizationUrlFromRequestUrifunction

The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).

{
  "name": "buildAuthorizationUrlFromRequestUri",
  "kind": "function",
  "description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 183
  },
  "type": "(issuerUrl: string, clientId: string, requestUri: string) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(issuerUrl: string, clientId: string, requestUri: string): string",
      "description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).",
      "parameters": [
        {
          "name": "issuerUrl",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "clientId",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "requestUri",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
buildEndSessionUrlfunction

The URL to send the person's browser to in order to end their session at the service.

{
  "name": "buildEndSessionUrl",
  "kind": "function",
  "description": "The URL to send the person's browser to in order to end their session at the service.",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 135
  },
  "type": "(options: EndSessionUrlOptions) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(options: EndSessionUrlOptions): string",
      "description": "The URL to send the person's browser to in order to end their session at the service.",
      "parameters": [
        {
          "name": "options",
          "type": "EndSessionUrlOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
CatalogPriceinterface
{
  "name": "CatalogPrice",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 212
  },
  "type": "CatalogPrice",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "amount_minor",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "currency",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "description",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "market",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "metadata",
      "optional": false,
      "type": "Record<string, unknown>",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "pack_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "price_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tax_behavior",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tax_code",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tax_rate_bps",
      "optional": false,
      "type": "number | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_quantity",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
checkLogoutClaimsfunction

The checks on a logout token whose signature and expiry already verified. Throws `LogoutTokenError`.

{
  "name": "checkLogoutClaims",
  "kind": "function",
  "description": "The checks on a logout token whose signature and expiry already verified. Throws `LogoutTokenError`.",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 99
  },
  "type": "(claims: Record<string, unknown>, rules: { clientIds: string[]; now: number; maxAgeSeconds: number; skewSeconds: number; }) => LogoutToken",
  "constructors": [],
  "signatures": [
    {
      "signature": "(claims: Record<string, unknown>, rules: { clientIds: string[]; now: number; maxAgeSeconds: number; skewSeconds: number; }): LogoutToken",
      "description": "The checks on a logout token whose signature and expiry already verified. Throws `LogoutTokenError`.",
      "parameters": [
        {
          "name": "claims",
          "type": "Record<string, unknown>",
          "optional": false,
          "description": ""
        },
        {
          "name": "rules",
          "type": "{ clientIds: string[]; now: number; maxAgeSeconds: number; skewSeconds: number; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "LogoutToken"
    }
  ],
  "properties": []
}
CheckoutResultinterface
{
  "name": "CheckoutResult",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 352
  },
  "type": "CheckoutResult",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "checkout_url",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "payment_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "purchase_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
CLIENT_ASSERTION_TYPEvalue
{
  "name": "CLIENT_ASSERTION_TYPE",
  "kind": "value",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 15
  },
  "type": "\"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\"",
  "constructors": [],
  "signatures": [],
  "properties": []
}
ClientAssertionAlgorithmtype
{
  "name": "ClientAssertionAlgorithm",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 20
  },
  "type": "SigningAlgorithm",
  "constructors": [],
  "signatures": [],
  "properties": []
}
ClientAssertionKeyclass

A private key registered for a client. The private half cannot be read back from this object.

{
  "name": "ClientAssertionKey",
  "kind": "class",
  "description": "A private key registered for a client. The private half cannot be read back from this object.",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 25
  },
  "type": "typeof ClientAssertionKey",
  "constructors": [
    {
      "signature": "new (alg: ClientAssertionAlgorithm, kid: string | undefined, privateKey: KeyLike | Uint8Array): ClientAssertionKey",
      "description": "",
      "parameters": [
        {
          "name": "alg",
          "type": "SigningAlgorithm",
          "optional": false,
          "description": ""
        },
        {
          "name": "kid",
          "type": "string | undefined",
          "optional": false,
          "description": ""
        },
        {
          "name": "privateKey",
          "type": "KeyLike | Uint8Array<ArrayBufferLike>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ClientAssertionKey"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "alg",
      "optional": false,
      "type": "SigningAlgorithm",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "kid",
      "optional": true,
      "type": "string | undefined",
      "description": "Sent as the JOSE `kid` so the service picks the right registered key.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { alg: ClientAssertionAlgorithm; kid?: string; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { alg: ClientAssertionAlgorithm; kid?: string; }",
          "description": "",
          "parameters": [],
          "returns": "{ alg: ClientAssertionAlgorithm; kid?: string; }"
        }
      ]
    }
  ]
}
ClientAssertionOptionsinterface
{
  "name": "ClientAssertionOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 56
  },
  "type": "ClientAssertionOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": false,
      "type": "string",
      "description": "The URL of the endpoint the assertion is presented to (`<issuer>/oauth/token` or `<issuer>/oauth/par`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": true,
      "type": "string | undefined",
      "description": "Defaults to a random UUID.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "key",
      "optional": false,
      "type": "ClientAssertionKey",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "lifetimeSeconds",
      "optional": true,
      "type": "number | undefined",
      "description": "Seconds the assertion stays valid: 1 to 300. Default 60.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "now",
      "optional": true,
      "type": "number | undefined",
      "description": "Unix seconds. Defaults to now.",
      "tags": [],
      "signatures": []
    }
  ]
}
ConsoleOverviewinterface
{
  "name": "ConsoleOverview",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 228
  },
  "type": "ConsoleOverview",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "activeSessionCount",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "applicationCount",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "eventCount",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "workspaceName",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "workspaceState",
      "optional": false,
      "type": "\"setup\" | \"active\" | \"restricted\"",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
CreateAccountInputinterface
{
  "name": "CreateAccountInput",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 236
  },
  "type": "CreateAccountInput",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "billing_email",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "slug",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
CreateApplicationInputinterface
{
  "name": "CreateApplicationInput",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 237
  },
  "type": "CreateApplicationInput",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "branding",
      "optional": true,
      "type": "Record<string, unknown> | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "channel_status",
      "optional": true,
      "type": "Record<string, unknown> | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "slug",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
createClientAssertionfunction
{
  "name": "createClientAssertion",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 69
  },
  "type": "(options: ClientAssertionOptions) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(options: ClientAssertionOptions): Promise<string>",
      "description": "",
      "parameters": [
        {
          "name": "options",
          "type": "ClientAssertionOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
CreatedInvitationinterface
{
  "name": "CreatedInvitation",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 340
  },
  "type": "CreatedInvitation",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "invitation",
      "optional": false,
      "type": "Invitation",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
createDpopProoffunction
{
  "name": "createDpopProof",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 105
  },
  "type": "(key: DpopKey, options: DpopProofOptions) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(key: DpopKey, options: DpopProofOptions): Promise<string>",
      "description": "",
      "parameters": [
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        },
        {
          "name": "options",
          "type": "DpopProofOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
createMultiIssuerVerifierfunction
{
  "name": "createMultiIssuerVerifier",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 584
  },
  "type": "(opts: MultiIssuerVerifierOptions) => MultiIssuerVerifier",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: MultiIssuerVerifierOptions): MultiIssuerVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "MultiIssuerVerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "MultiIssuerVerifier"
    }
  ],
  "properties": []
}
createVerifierfunction
{
  "name": "createVerifier",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 580
  },
  "type": "(opts: VerifierOptions) => TokenVerifier",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: VerifierOptions): TokenVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "VerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "TokenVerifier"
    }
  ],
  "properties": []
}
CurrentUserinterface
{
  "name": "CurrentUser",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 132
  },
  "type": "CurrentUser",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "app",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "authUserId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "centralIdentityId",
      "optional": false,
      "type": "string",
      "description": "Central auth identity for compatibility flows",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "firmId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "hasScope",
      "optional": false,
      "type": "(scope: string) => boolean",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(scope: string): boolean",
          "description": "",
          "parameters": [
            {
              "name": "scope",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "boolean"
        }
      ]
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "identityClass",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isActive",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isAdmin",
      "optional": false,
      "type": "() => boolean",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): boolean",
          "description": "",
          "parameters": [],
          "returns": "boolean"
        }
      ]
    },
    {
      "name": "issuer",
      "optional": true,
      "type": "string | undefined",
      "description": "The verified token's issuer (the allow-listed issuer that signed it).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isSystemAdmin",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "permissionsVersion",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sessionId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tokenVersion",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
DEFAULT_CLIENT_ASSERTION_LIFETIME_SECONDSvalue
{
  "name": "DEFAULT_CLIENT_ASSERTION_LIFETIME_SECONDS",
  "kind": "value",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 16
  },
  "type": "60",
  "constructors": [],
  "signatures": [],
  "properties": []
}
DEFAULT_LOGOUT_TOKEN_MAX_AGE_SECONDSvalue

A logout token the service signed is not accepted when it was issued longer ago than this (it sends for ten minutes).

{
  "name": "DEFAULT_LOGOUT_TOKEN_MAX_AGE_SECONDS",
  "kind": "value",
  "description": "A logout token the service signed is not accepted when it was issued longer ago than this (it sends for ten minutes).",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 17
  },
  "type": "600",
  "constructors": [],
  "signatures": [],
  "properties": []
}
DEFAULT_MIN_FETCH_INTERVAL_MSvalue

Default minimum interval between JWKS fetch attempts — bounds the kid-miss refetch path (a forged kid cannot drive a fetch loop), matching jose's `cooldownDuration` contract. `0` disables it (tests). The bound is kept per issuer.

{
  "name": "DEFAULT_MIN_FETCH_INTERVAL_MS",
  "kind": "value",
  "description": "Default minimum interval between JWKS fetch attempts — bounds the\nkid-miss refetch path (a forged kid cannot drive a fetch loop), matching\njose's `cooldownDuration` contract. `0` disables it (tests). The bound is\nkept per issuer.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 46
  },
  "type": "10000",
  "constructors": [],
  "signatures": [],
  "properties": []
}
DEVICE_CODE_GRANTvalue
{
  "name": "DEVICE_CODE_GRANT",
  "kind": "value",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 12
  },
  "type": "\"urn:ietf:params:oauth:grant-type:device_code\"",
  "constructors": [],
  "signatures": [],
  "properties": []
}
DeviceAuthorizationinterface

The answer to a device authorization request: show `user_code` and `verification_uri` to the person.

{
  "name": "DeviceAuthorization",
  "kind": "interface",
  "description": "The answer to a device authorization request: show `user_code` and `verification_uri` to the person.",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 23
  },
  "type": "DeviceAuthorization",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "device_code",
      "optional": false,
      "type": "string",
      "description": "Secret the device polls with. Never show it.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "Seconds until the codes expire.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "interval",
      "optional": true,
      "type": "number | undefined",
      "description": "Minimum seconds between polls.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "user_code",
      "optional": false,
      "type": "string",
      "description": "What the person types at `verification_uri`.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "verification_uri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "verification_uri_complete",
      "optional": true,
      "type": "string | undefined",
      "description": "`verification_uri` with the code filled in, for a QR code or a link.",
      "tags": [],
      "signatures": []
    }
  ]
}
DevicePollOptionsinterface
{
  "name": "DevicePollOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 37
  },
  "type": "DevicePollOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "now",
      "optional": true,
      "type": "(() => number) | undefined",
      "description": "Milliseconds clock (tests).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "signal",
      "optional": true,
      "type": "AbortSignal | undefined",
      "description": "Stops the wait and the flow; the signal's reason is thrown.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sleep",
      "optional": true,
      "type": "((ms: number, signal?: AbortSignal) => Promise<void>) | undefined",
      "description": "Replace the wait (tests, fake timers). Must reject when the signal aborts.",
      "tags": [],
      "signatures": []
    }
  ]
}
dpopAccessTokenHashfunction

`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).

{
  "name": "dpopAccessTokenHash",
  "kind": "function",
  "description": "`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 53
  },
  "type": "(accessToken: string) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(accessToken: string): Promise<string>",
      "description": "`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).",
      "parameters": [
        {
          "name": "accessToken",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
DpopAlgorithmtype
{
  "name": "DpopAlgorithm",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 23
  },
  "type": "SigningAlgorithm",
  "constructors": [],
  "signatures": [],
  "properties": []
}
dpopHtufunction

`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.

{
  "name": "dpopHtu",
  "kind": "function",
  "description": "`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 59
  },
  "type": "(url: string) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(url: string): string",
      "description": "`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.",
      "parameters": [
        {
          "name": "url",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
DpopKeyclass

A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.

{
  "name": "DpopKey",
  "kind": "class",
  "description": "A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 28
  },
  "type": "typeof DpopKey",
  "constructors": [
    {
      "signature": "new (alg: DpopAlgorithm, publicJwk: JWK, thumbprint: string, privateKey: KeyLike | Uint8Array): DpopKey",
      "description": "",
      "parameters": [
        {
          "name": "alg",
          "type": "SigningAlgorithm",
          "optional": false,
          "description": ""
        },
        {
          "name": "publicJwk",
          "type": "JWK",
          "optional": false,
          "description": ""
        },
        {
          "name": "thumbprint",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "privateKey",
          "type": "KeyLike | Uint8Array<ArrayBufferLike>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "DpopKey"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "alg",
      "optional": false,
      "type": "SigningAlgorithm",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "publicJwk",
      "optional": false,
      "type": "JWK",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "thumbprint",
      "optional": false,
      "type": "string",
      "description": "RFC 7638 SHA-256 thumbprint of the public key: the `jkt` the service binds tokens to.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }",
          "description": "",
          "parameters": [],
          "returns": "{ alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }"
        }
      ]
    }
  ]
}
DpopProofOptionsinterface
{
  "name": "DpopProofOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 90
  },
  "type": "DpopProofOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "accessToken",
      "optional": true,
      "type": "string | undefined",
      "description": "Include `ath` for a resource request made with this access token.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": true,
      "type": "string | undefined",
      "description": "Defaults to a random UUID: every proof must have its own.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "method",
      "optional": false,
      "type": "string",
      "description": "The HTTP method of the request the proof is for. Upper-cased.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "nonce",
      "optional": true,
      "type": "string | undefined",
      "description": "A nonce the server gave (RFC 9449 section 8).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "now",
      "optional": true,
      "type": "number | undefined",
      "description": "Unix seconds. Defaults to now.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "url",
      "optional": false,
      "type": "string",
      "description": "The request URL; its query and fragment are not part of the proof.",
      "tags": [],
      "signatures": []
    }
  ]
}
DpopSessionclass

Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.

{
  "name": "DpopSession",
  "kind": "class",
  "description": "Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 137
  },
  "type": "typeof DpopSession",
  "constructors": [
    {
      "signature": "new (key: DpopKey): DpopSession",
      "description": "",
      "parameters": [
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "DpopSession"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "fetch",
      "optional": false,
      "type": "(fetcher: Fetcher, url: string, init?: RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>), options?: { accessToken?: string; }) => Promise<Response>",
      "description": "`fetcher(url, init)` is called with the proof added. `init.headers` must be a plain object; a\n`DPoP` header the caller set is replaced. `accessToken` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`init` may be a function of the attempt number (0, then 1 on the one retry after a nonce\nchallenge): it is called again for the retry, so a request that carries a single-use credential\n(a `private_key_jwt` assertion) can mint a new one instead of replaying the first.",
      "tags": [],
      "signatures": [
        {
          "signature": "(fetcher: Fetcher, url: string, init?: RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>), options?: { accessToken?: string; }): Promise<Response>",
          "description": "`fetcher(url, init)` is called with the proof added. `init.headers` must be a plain object; a\n`DPoP` header the caller set is replaced. `accessToken` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`init` may be a function of the attempt number (0, then 1 on the one retry after a nonce\nchallenge): it is called again for the retry, so a request that carries a single-use credential\n(a `private_key_jwt` assertion) can mint a new one instead of replaying the first.",
          "parameters": [
            {
              "name": "fetcher",
              "type": "Fetcher",
              "optional": false,
              "description": ""
            },
            {
              "name": "url",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "init",
              "type": "RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>)",
              "optional": false,
              "description": ""
            },
            {
              "name": "options",
              "type": "{ accessToken?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Response>"
        }
      ]
    },
    {
      "name": "headers",
      "optional": false,
      "type": "(request: { method: string; url: string; accessToken?: string; }) => Promise<Record<string, string>>",
      "description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a token goes with it.",
      "tags": [],
      "signatures": [
        {
          "signature": "(request: { method: string; url: string; accessToken?: string; }): Promise<Record<string, string>>",
          "description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a token goes with it.",
          "parameters": [
            {
              "name": "request",
              "type": "{ method: string; url: string; accessToken?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, string>>"
        }
      ]
    },
    {
      "name": "key",
      "optional": false,
      "type": "DpopKey",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
dpopThumbprintfunction

RFC 7638 thumbprint (base64url SHA-256) of a public JWK.

{
  "name": "dpopThumbprint",
  "kind": "function",
  "description": "RFC 7638 thumbprint (base64url SHA-256) of a public JWK.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 48
  },
  "type": "(jwk: JWK) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(jwk: JWK): Promise<string>",
      "description": "RFC 7638 thumbprint (base64url SHA-256) of a public JWK.",
      "parameters": [
        {
          "name": "jwk",
          "type": "JWK",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
EmailVerifyResponseinterface
{
  "name": "EmailVerifyResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 184
  },
  "type": "EmailVerifyResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "verified",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
EndSessionUrlOptionsinterface
{
  "name": "EndSessionUrlOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 120
  },
  "type": "EndSessionUrlOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "endSessionEndpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "The discovered `end_session_endpoint`. Must be on the issuer's origin. Defaults to `<issuer>/oauth/end_session`.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "idTokenHint",
      "optional": true,
      "type": "string | undefined",
      "description": "The ID token the person signed in with. The service uses it to know which client is asking.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "postLogoutRedirectUri",
      "optional": true,
      "type": "string | undefined",
      "description": "Where to send the person afterwards. Must be one of the client's registered redirect URIs; needs `idTokenHint`.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "state",
      "optional": true,
      "type": "string | undefined",
      "description": "Echoed back on the redirect; needs `postLogoutRedirectUri`.",
      "tags": [],
      "signatures": []
    }
  ]
}
expressAuthfunction
{
  "name": "expressAuth",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 29
  },
  "type": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }) => (req: { headers: Record<string, string | undefined>; path?: string; url?: string; user?: unknown; }, res: { status: (c: number) => { json: (b: unknown) => void; setHeader?: (k: string, v: string) => void; } & Record<string, unknown>; setHeader?: (k: string, v: string) => void; }, next: (err?: unknown) => void) => Promise<void>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }): (req: { headers: Record<string, string | undefined>; path?: string; url?: string; user?: unknown; }, res: { status: (c: number) => { json: (b: unknown) => void; setHeader?: (k: string, v: string) => void; } & Record<string, unknown>; setHeader?: (k: string, v: string) => void; }, next: (err?: unknown) => void) => Promise<void>",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ verifier: AccessTokenVerifier; publicPaths?: string[]; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "(req: { headers: Record<string, string | undefined>; path?: string; url?: string; user?: unknown; }, res: { status: (c: number) => { json: (b: unknown) => void; setHeader?: (k: string, v: string) => void; } & Record<string, unknown>; setHeader?: (k: string, v: string) => void; }, next: (err?: unknown) => void) => Promise<void>"
    }
  ],
  "properties": []
}
fastifyAuthfunction
{
  "name": "fastifyAuth",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 60
  },
  "type": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }) => (request: { headers: Record<string, string | undefined>; url: string; user?: unknown; }, reply: { code: (c: number) => { send: (b: unknown) => void; header: (k: string, v: string) => void; } & Record<string, unknown>; }) => Promise<void>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }): (request: { headers: Record<string, string | undefined>; url: string; user?: unknown; }, reply: { code: (c: number) => { send: (b: unknown) => void; header: (k: string, v: string) => void; } & Record<string, unknown>; }) => Promise<void>",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ verifier: AccessTokenVerifier; publicPaths?: string[]; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "(request: { headers: Record<string, string | undefined>; url: string; user?: unknown; }, reply: { code: (c: number) => { send: (b: unknown) => void; header: (k: string, v: string) => void; } & Record<string, unknown>; }) => Promise<void>"
    }
  ],
  "properties": []
}
generateCodeChallengefunction
{
  "name": "generateCodeChallenge",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth.ts",
    "line": 14
  },
  "type": "(verifier: string) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(verifier: string): string",
      "description": "",
      "parameters": [
        {
          "name": "verifier",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
generateCodeVerifierfunction
{
  "name": "generateCodeVerifier",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth.ts",
    "line": 8
  },
  "type": "() => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): string",
      "description": "",
      "parameters": [],
      "returns": "string"
    }
  ],
  "properties": []
}
generateDpopKeyfunction
{
  "name": "generateDpopKey",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 75
  },
  "type": "(alg?: DpopAlgorithm) => Promise<DpopKey>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(alg?: DpopAlgorithm): Promise<DpopKey>",
      "description": "",
      "parameters": [
        {
          "name": "alg",
          "type": "SigningAlgorithm",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<DpopKey>"
    }
  ],
  "properties": []
}
honoAuthfunction
{
  "name": "honoAuth",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 105
  },
  "type": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }) => (c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }): (c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ verifier: AccessTokenVerifier; publicPaths?: string[]; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "(c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>"
    }
  ],
  "properties": []
}
idTokenPolicyfunction

ID-token policy: `type === "id"` (absent tolerated — the service's only legacy window, pre-SEC-02 mints) + iss/sub/aud/exp/iat/auth_time.

{
  "name": "idTokenPolicy",
  "kind": "function",
  "description": "ID-token policy: `type === \"id\"` (absent tolerated — the service's only\nlegacy window, pre-SEC-02 mints) + iss/sub/aud/exp/iat/auth_time.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 48
  },
  "type": "() => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): ValidationPolicy",
      "description": "ID-token policy: `type === \"id\"` (absent tolerated — the service's only\nlegacy window, pre-SEC-02 mints) + iss/sub/aud/exp/iat/auth_time.",
      "parameters": [],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
importClientAssertionKeyfunction
{
  "name": "importClientAssertionKey",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 42
  },
  "type": "(input: { alg: ClientAssertionAlgorithm; privateJwk?: JWK; privatePem?: string; privateKey?: KeyLike; kid?: string; }) => Promise<ClientAssertionKey>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(input: { alg: ClientAssertionAlgorithm; privateJwk?: JWK; privatePem?: string; privateKey?: KeyLike; kid?: string; }): Promise<ClientAssertionKey>",
      "description": "",
      "parameters": [
        {
          "name": "input",
          "type": "{ alg: ClientAssertionAlgorithm; privateJwk?: JWK; privatePem?: string; privateKey?: KeyLike; kid?: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<ClientAssertionKey>"
    }
  ],
  "properties": []
}
importDpopKeyfunction

Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.

{
  "name": "importDpopKey",
  "kind": "function",
  "description": "Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 83
  },
  "type": "(input: { alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }) => Promise<DpopKey>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(input: { alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }): Promise<DpopKey>",
      "description": "Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.",
      "parameters": [
        {
          "name": "input",
          "type": "{ alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<DpopKey>"
    }
  ],
  "properties": []
}
internalAssertionPolicyfunction

Internal-assertion policy (service→service carry): `type === "access"` + sub == client_id.

{
  "name": "internalAssertionPolicy",
  "kind": "function",
  "description": "Internal-assertion policy (service→service carry): `type === \"access\"`\n+ sub == client_id.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 59
  },
  "type": "() => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): ValidationPolicy",
      "description": "Internal-assertion policy (service→service carry): `type === \"access\"`\n+ sub == client_id.",
      "parameters": [],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
IntrospectionResponseinterface
{
  "name": "IntrospectionResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 73
  },
  "type": "IntrospectionResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "active",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "app",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "aud",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "auth_user_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "central_user_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "exp",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "iat",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "identity_class",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "is_system_admin",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "iss",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "permissions",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "permissions_version",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "session_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sub",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_type",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_version",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "username",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
Invitationinterface
{
  "name": "Invitation",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 332
  },
  "type": "Invitation",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "account_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "role",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
isAtJwtTypfunction

RFC 9068 §2.1: `typ` compares case-insensitively as a media type; `application/at+jwt` is the explicit-registration equivalent.

{
  "name": "isAtJwtTyp",
  "kind": "function",
  "description": "RFC 9068 §2.1: `typ` compares case-insensitively as a media type;\n`application/at+jwt` is the explicit-registration equivalent.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 78
  },
  "type": "(typ: string | undefined | null) => boolean",
  "constructors": [],
  "signatures": [
    {
      "signature": "(typ: string | undefined | null): boolean",
      "description": "RFC 9068 §2.1: `typ` compares case-insensitively as a media type;\n`application/at+jwt` is the explicit-registration equivalent.",
      "parameters": [
        {
          "name": "typ",
          "type": "string | null | undefined",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "boolean"
    }
  ],
  "properties": []
}
isJwtErrorfunction
{
  "name": "isJwtError",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 80
  },
  "type": "(e: unknown) => e is JwtError",
  "constructors": [],
  "signatures": [
    {
      "signature": "(e: unknown): e is JwtError",
      "description": "",
      "parameters": [
        {
          "name": "e",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "boolean"
    }
  ],
  "properties": []
}
isLogoutTypfunction
{
  "name": "isLogoutTyp",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 82
  },
  "type": "(typ: unknown) => boolean",
  "constructors": [],
  "signatures": [
    {
      "signature": "(typ: unknown): boolean",
      "description": "",
      "parameters": [
        {
          "name": "typ",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "boolean"
    }
  ],
  "properties": []
}
isOAuthErrorfunction
{
  "name": "isOAuthError",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 77
  },
  "type": "(e: unknown) => e is OAuthError",
  "constructors": [],
  "signatures": [
    {
      "signature": "(e: unknown): e is OAuthError",
      "description": "",
      "parameters": [
        {
          "name": "e",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "boolean"
    }
  ],
  "properties": []
}
IssuerConfiginterface

One allow-listed issuer. `jwksUri` overrides the default `<issuer>/.well-known/jwks.json` (set it from discovery).

{
  "name": "IssuerConfig",
  "kind": "interface",
  "description": "One allow-listed issuer. `jwksUri` overrides the default\n`<issuer>/.well-known/jwks.json` (set it from discovery).",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 50
  },
  "type": "IssuerConfig",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwksUri",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
Jwkinterface
{
  "name": "Jwk",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 44
  },
  "type": "Jwk",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "alg",
      "optional": false,
      "type": "\"RS256\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "e",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "kid",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "kty",
      "optional": false,
      "type": "\"RSA\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "n",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "use",
      "optional": false,
      "type": "\"sig\"",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
JwksResponseinterface
{
  "name": "JwksResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 53
  },
  "type": "JwksResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "keys",
      "optional": false,
      "type": "Jwk[]",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
JwtErrorclass
{
  "name": "JwtError",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 35
  },
  "type": "typeof JwtError",
  "constructors": [
    {
      "signature": "new (message: string, code?: JwtError[\"code\"]): JwtError",
      "description": "",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "code",
          "type": "\"expired\" | \"invalid\" | \"kid_mismatch\" | \"missing_key\" | \"audience_mismatch\" | \"issuer_mismatch\"",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "JwtError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": false,
      "type": "\"expired\" | \"invalid\" | \"kid_mismatch\" | \"missing_key\" | \"audience_mismatch\" | \"issuer_mismatch\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
LedgerEntryinterface
{
  "name": "LedgerEntry",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 286
  },
  "type": "LedgerEntry",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "available_balance_after",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "available_balance_before",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "challenge_id",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "created_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "delta",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "kind",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "metadata",
      "optional": false,
      "type": "Record<string, unknown>",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "purchase_id",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "request_id",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reserved_balance_after",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reserved_balance_before",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
LoginResponseinterface
{
  "name": "LoginResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 173
  },
  "type": "LoginResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "access_token",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id_token",
      "optional": true,
      "type": "string | undefined",
      "description": "Optional ID token. OTP supplies a fresh receipt only for an explicitly nonce-bound server session. Refresh is not fresh-login evidence.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issued_token_type",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 8693: the type of the token issued by a token exchange.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "refresh_token",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "session_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_type",
      "optional": false,
      "type": "\"DPoP\" | \"Bearer\"",
      "description": "`DPoP` when the tokens were bound to a DPoP key (RFC 9449): present them under the DPoP scheme with a proof.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "user",
      "optional": false,
      "type": "AuthenticatedUser",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
LogoutFailuretype
{
  "name": "LogoutFailure",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 21
  },
  "type": "LogoutFailure",
  "constructors": [],
  "signatures": [],
  "properties": []
}
LogoutTokeninterface

What a verified logout token tells the relying party.

{
  "name": "LogoutToken",
  "kind": "interface",
  "description": "What a verified logout token tells the relying party.",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 70
  },
  "type": "LogoutToken",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "claims",
      "optional": false,
      "type": "Record<string, unknown>",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expiresAt",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuedAt",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sessionId",
      "optional": true,
      "type": "string | undefined",
      "description": "The session to end (absent when the token names only a subject).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "subject",
      "optional": true,
      "type": "string | undefined",
      "description": "The subject whose sessions end (absent when the token names only a session).",
      "tags": [],
      "signatures": []
    }
  ]
}
LogoutTokenErrorclass

A back-channel logout token that must not be acted on. `reason` says which rule it broke.

{
  "name": "LogoutTokenError",
  "kind": "class",
  "description": "A back-channel logout token that must not be acted on. `reason` says which rule it broke.",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 44
  },
  "type": "typeof LogoutTokenError",
  "constructors": [
    {
      "signature": "new (reason: LogoutFailure): LogoutTokenError",
      "description": "",
      "parameters": [
        {
          "name": "reason",
          "type": "LogoutFailure",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "LogoutTokenError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": false,
      "type": "\"expired\" | \"invalid\" | \"kid_mismatch\" | \"missing_key\" | \"audience_mismatch\" | \"issuer_mismatch\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reason",
      "optional": false,
      "type": "LogoutFailure",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
MAX_CLIENT_ASSERTION_LIFETIME_SECONDSvalue

The service refuses an assertion whose `exp` is further than this ahead.

{
  "name": "MAX_CLIENT_ASSERTION_LIFETIME_SECONDS",
  "kind": "value",
  "description": "The service refuses an assertion whose `exp` is further than this ahead.",
  "tags": [],
  "source": {
    "file": "src/client-assertion.ts",
    "line": 18
  },
  "type": "300",
  "constructors": [],
  "signatures": [],
  "properties": []
}
Membershipinterface
{
  "name": "Membership",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 345
  },
  "type": "Membership",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "account_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "role",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "user_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
MultiIssuerVerifierclass

Verifies access tokens from an explicit allow-list of issuers.

{
  "name": "MultiIssuerVerifier",
  "kind": "class",
  "description": "Verifies access tokens from an explicit allow-list of issuers.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 199
  },
  "type": "typeof MultiIssuerVerifier",
  "constructors": [
    {
      "signature": "new (opts: MultiIssuerVerifierOptions): MultiIssuerVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "MultiIssuerVerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "MultiIssuerVerifier"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "decodeUnverified",
      "optional": false,
      "type": "(token: string) => Record<string, unknown>",
      "description": "Decode without verification (debug only).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Record<string, unknown>",
          "description": "Decode without verification (debug only).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Record<string, unknown>"
        }
      ]
    },
    {
      "name": "issuers",
      "optional": false,
      "type": "string[]",
      "description": "The normalised issuer allow-list, in configuration order.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "setIssuerJwksUri",
      "optional": false,
      "type": "(issuerUrl: string, uri: string) => void",
      "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
      "tags": [],
      "signatures": [
        {
          "signature": "(issuerUrl: string, uri: string): void",
          "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
          "parameters": [
            {
              "name": "issuerUrl",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "verify",
      "optional": false,
      "type": "(token: string, opts?: VerifyOptions) => Promise<CurrentUser>",
      "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts?: VerifyOptions): Promise<CurrentUser>",
          "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CurrentUser>"
        }
      ]
    },
    {
      "name": "verifyClaims",
      "optional": false,
      "type": "(token: string, policy: ValidationPolicy) => Promise<Record<string, unknown>>",
      "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, policy: ValidationPolicy): Promise<Record<string, unknown>>",
          "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "policy",
              "type": "ValidationPolicy",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, unknown>>"
        }
      ]
    },
    {
      "name": "verifyLogoutToken",
      "optional": false,
      "type": "(token: string, opts: VerifyLogoutTokenOptions) => Promise<LogoutToken>",
      "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts: VerifyLogoutTokenOptions): Promise<LogoutToken>",
          "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyLogoutTokenOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LogoutToken>"
        }
      ]
    }
  ]
}
MultiIssuerVerifierOptionsinterface
{
  "name": "MultiIssuerVerifierOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 83
  },
  "type": "MultiIssuerVerifierOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": false,
      "type": "string | string[]",
      "description": "Audience(s) this resource server accepts (required): a token minted for a\ndifferent resource is rejected. A verifier with no audience pin would\naccept any token an issuer ever signed.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clockSkewSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuers",
      "optional": false,
      "type": "(string | IssuerConfig)[]",
      "description": "The explicit issuer allow-list (required, non-empty). A token whose `iss`\nis not exactly one of these is refused before any network call.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwksCacheTtlSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "minJwksFetchIntervalMs",
      "optional": true,
      "type": "number | undefined",
      "description": "Minimum ms between JWKS fetch attempts, per issuer. Default 10_000; 0\ndisables.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "requireAtJwt",
      "optional": true,
      "type": "boolean | undefined",
      "description": "RFC 9068 typ enforcement on verify(). Default on; set false only for\npre-WP-03b mints. Prefer `verifyClaims()` with an explicit policy for\nnon-access purposes.",
      "tags": [],
      "signatures": []
    }
  ]
}
NetworkErrorclass
{
  "name": "NetworkError",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 44
  },
  "type": "typeof NetworkError",
  "constructors": [
    {
      "signature": "new (message: string, cause?: unknown): NetworkError",
      "description": "",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "cause",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "NetworkError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
nextVerifyRequestfunction
{
  "name": "nextVerifyRequest",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 88
  },
  "type": "(request: { headers: { get: (k: string) => string | null; }; }, verifier: AccessTokenVerifier) => Promise<{ user: unknown; } | { error: string; status: 401; }>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(request: { headers: { get: (k: string) => string | null; }; }, verifier: AccessTokenVerifier): Promise<{ user: unknown; } | { error: string; status: 401; }>",
      "description": "",
      "parameters": [
        {
          "name": "request",
          "type": "{ headers: { get: (k: string) => string | null; }; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "verifier",
          "type": "AccessTokenVerifier",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<{ user: unknown; } | { error: string; status: 401; }>"
    }
  ],
  "properties": []
}
OAuthErrorclass

Errors for

{
  "name": "OAuthError",
  "kind": "class",
  "description": "Errors for",
  "tags": [
    {
      "name": "beyondigital",
      "text": "/auth-sdk"
    }
  ],
  "source": {
    "file": "src/errors.ts",
    "line": 5
  },
  "type": "typeof OAuthError",
  "constructors": [
    {
      "signature": "new (opts: { error: string; error_description?: string; status: number; statusText?: string; }): OAuthError",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ error: string; error_description?: string; status: number; statusText?: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "OAuthError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "error",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "errorDescription",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "statusText",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { name: string; error: string; error_description: string; status: number; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { name: string; error: string; error_description: string; status: number; }",
          "description": "",
          "parameters": [],
          "returns": "{ name: string; error: string; error_description: string; status: number; }"
        }
      ]
    }
  ]
}
OidcMetadatainterface
{
  "name": "OidcMetadata",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 11
  },
  "type": "OidcMetadata",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "authorization_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "authorization_response_iss_parameter_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "claims_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id_metadata_document_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code_challenge_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "device_authorization_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 8628.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "dpop_signing_alg_values_supported",
      "optional": true,
      "type": "string[] | undefined",
      "description": "RFC 9449: the proof algorithms the token endpoint accepts.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "end_session_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "OIDC RP-Initiated Logout: where to send the browser to end the session.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "grant_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id_token_signing_alg_values_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "introspection_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "introspection_endpoint_auth_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwks_uri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "pushed_authorization_request_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 9126.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "registration_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "require_pushed_authorization_requests",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource_parameter_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "response_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "revocation_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "subject_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint_auth_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint_auth_signing_alg_values_supported",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "userinfo_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OtpClientclass
{
  "name": "OtpClient",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/otp.ts",
    "line": 49
  },
  "type": "typeof OtpClient",
  "constructors": [
    {
      "signature": "new (config: OtpClientConfig): OtpClient",
      "description": "",
      "parameters": [
        {
          "name": "config",
          "type": "OtpClientConfig",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "OtpClient"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cancelServerOtpSession",
      "optional": false,
      "type": "(opts: { app: string; clientId: string; environmentId: string; nonce: string; }) => Promise<OtpSessionCancellation>",
      "description": "Cancel one nonce-bound attempt with its original server API key (otp:verify).\nPersist/retry uncertain cancellations in your BFF; this client never retries automatically.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { app: string; clientId: string; environmentId: string; nonce: string; }): Promise<OtpSessionCancellation>",
          "description": "Cancel one nonce-bound attempt with its original server API key (otp:verify).\nPersist/retry uncertain cancellations in your BFF; this client never retries automatically.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ app: string; clientId: string; environmentId: string; nonce: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpSessionCancellation>"
        }
      ]
    },
    {
      "name": "passwordLogin",
      "optional": false,
      "type": "(opts: { email: string; password: string; app?: string; clientId?: string; }) => Promise<LoginResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { email: string; password: string; app?: string; clientId?: string; }): Promise<LoginResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ email: string; password: string; app?: string; clientId?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LoginResponse>"
        }
      ]
    },
    {
      "name": "refreshToken",
      "optional": false,
      "type": "(opts: { refreshToken: string; clientId?: string; resource?: string | string[]; }) => Promise<TokenResponse>",
      "description": "Rotate through the strict OAuth endpoint, preserving the resource pin.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { refreshToken: string; clientId?: string; resource?: string | string[]; }): Promise<TokenResponse>",
          "description": "Rotate through the strict OAuth endpoint, preserving the resource pin.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ refreshToken: string; clientId?: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "sendEmailVerifyOtp",
      "optional": false,
      "type": "(opts: { email: string; app?: string; clientId: string; }, accessToken: string) => Promise<OtpSendResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { email: string; app?: string; clientId: string; }, accessToken: string): Promise<OtpSendResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ email: string; app?: string; clientId: string; }",
              "optional": false,
              "description": ""
            },
            {
              "name": "accessToken",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpSendResponse>"
        }
      ]
    },
    {
      "name": "sendLoginOtp",
      "optional": false,
      "type": "(opts: { phone: string; app?: string; channel?: string; clientId: string; }) => Promise<OtpSendResponse>",
      "description": "Send login OTP to a phone (E.164).",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { phone: string; app?: string; channel?: string; clientId: string; }): Promise<OtpSendResponse>",
          "description": "Send login OTP to a phone (E.164).",
          "parameters": [
            {
              "name": "opts",
              "type": "{ phone: string; app?: string; channel?: string; clientId: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpSendResponse>"
        }
      ]
    },
    {
      "name": "sendRegisterOtp",
      "optional": false,
      "type": "(opts: { phone: string; fullName: string; app?: string; clientId: string; }) => Promise<OtpSendResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { phone: string; fullName: string; app?: string; clientId: string; }): Promise<OtpSendResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ phone: string; fullName: string; app?: string; clientId: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpSendResponse>"
        }
      ]
    },
    {
      "name": "sendServerOtp",
      "optional": false,
      "type": "(opts: { recipient: string; app?: string; channel?: string; } & ServerOtpBinding) => Promise<OtpSendResponse>",
      "description": "Server runtimes only. Defaults to deterministic identity verification.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { recipient: string; app?: string; channel?: string; } & ServerOtpBinding): Promise<OtpSendResponse>",
          "description": "Server runtimes only. Defaults to deterministic identity verification.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ recipient: string; app?: string; channel?: string; } & ServerOtpBinding",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpSendResponse>"
        }
      ]
    },
    {
      "name": "verifyEmailOtp",
      "optional": false,
      "type": "(opts: { email: string; otp: string; app?: string; clientId: string; }, accessToken: string) => Promise<EmailVerifyResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { email: string; otp: string; app?: string; clientId: string; }, accessToken: string): Promise<EmailVerifyResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ email: string; otp: string; app?: string; clientId: string; }",
              "optional": false,
              "description": ""
            },
            {
              "name": "accessToken",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<EmailVerifyResponse>"
        }
      ]
    },
    {
      "name": "verifyLoginOtp",
      "optional": false,
      "type": "(opts: { phone: string; otp: string; app?: string; channel?: string; clientId: string; }) => Promise<LoginResponse>",
      "description": "Verify login OTP — returns TokenResponse+user.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { phone: string; otp: string; app?: string; channel?: string; clientId: string; }): Promise<LoginResponse>",
          "description": "Verify login OTP — returns TokenResponse+user.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ phone: string; otp: string; app?: string; channel?: string; clientId: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LoginResponse>"
        }
      ]
    },
    {
      "name": "verifyRegisterOtp",
      "optional": false,
      "type": "(opts: { phone: string; otp: string; fullName: string; app?: string; clientId: string; }) => Promise<LoginResponse>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { phone: string; otp: string; fullName: string; app?: string; clientId: string; }): Promise<LoginResponse>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ phone: string; otp: string; fullName: string; app?: string; clientId: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LoginResponse>"
        }
      ]
    },
    {
      "name": "verifyServerOtp",
      "optional": false,
      "type": "(opts: { recipient: string; otp: string; app?: string; channel?: string; } & ServerOtpBinding) => Promise<OtpVerificationResponse>",
      "description": "Use the same mode, client, environment and optional nonce as sendServerOtp.\nA returned ID token still needs signature/issuer/client/nonce/auth_time/amr/at_hash verification.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { recipient: string; otp: string; app?: string; channel?: string; } & ServerOtpBinding): Promise<OtpVerificationResponse>",
          "description": "Use the same mode, client, environment and optional nonce as sendServerOtp.\nA returned ID token still needs signature/issuer/client/nonce/auth_time/amr/at_hash verification.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ recipient: string; otp: string; app?: string; channel?: string; } & ServerOtpBinding",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<OtpVerificationResponse>"
        }
      ]
    }
  ]
}
OtpClientConfiginterface
{
  "name": "OtpClientConfig",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/otp.ts",
    "line": 10
  },
  "type": "OtpClientConfig",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "apiKey",
      "optional": true,
      "type": "string | undefined",
      "description": "Server-only application API key. Never expose this value to browser or mobile code.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "httpTimeoutMs",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OtpIdentityResponseinterface
{
  "name": "OtpIdentityResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 177
  },
  "type": "OtpIdentityResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "user",
      "optional": false,
      "type": "AuthenticatedUser",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "verified",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OtpSendResponseinterface
{
  "name": "OtpSendResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 155
  },
  "type": "OtpSendResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "delivery_channel",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resend_available_in",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OtpSessionCancellationinterface

Acknowledgement only; cancellation never recovers credentials or session tokens.

{
  "name": "OtpSessionCancellation",
  "kind": "interface",
  "description": "Acknowledgement only; cancellation never recovers credentials or session tokens.",
  "tags": [],
  "source": {
    "file": "src/otp.ts",
    "line": 24
  },
  "type": "OtpSessionCancellation",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "status",
      "optional": false,
      "type": "\"cancelled\"",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OtpVerificationResponsetype
{
  "name": "OtpVerificationResponse",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 182
  },
  "type": "OtpVerificationResponse",
  "constructors": [],
  "signatures": [],
  "properties": []
}
parseCallbackParamsfunction
{
  "name": "parseCallbackParams",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 47
  },
  "type": "(callbackUrl: string) => { code: string; state?: string; iss?: string; }",
  "constructors": [],
  "signatures": [
    {
      "signature": "(callbackUrl: string): { code: string; state?: string; iss?: string; }",
      "description": "",
      "parameters": [
        {
          "name": "callbackUrl",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "{ code: string; state?: string; iss?: string; }"
    }
  ],
  "properties": []
}
pollForDeviceTokenfunction

Poll until the person decides (RFC 8628 section 3.5). The wait comes before every poll; `slow_down` adds five seconds to every later wait; `authorization_pending` waits again; every other error (including `access_denied` and `expired_token`) ends the flow and is thrown as the service sent it. The device code's own lifetime is enforced here too: no request is made once the next wait would pass it. A network failure is thrown, not retried: call this again with the same authorization to resume.

{
  "name": "pollForDeviceToken",
  "kind": "function",
  "description": "Poll until the person decides (RFC 8628 section 3.5). The wait comes before every poll; `slow_down`\nadds five seconds to every later wait; `authorization_pending` waits again; every other error (including\n`access_denied` and `expired_token`) ends the flow and is thrown as the service sent it. The device\ncode's own lifetime is enforced here too: no request is made once the next wait would pass it.\nA network failure is thrown, not retried: call this again with the same authorization to resume.",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 95
  },
  "type": "(device: DeviceAuthorization, options: DevicePollOptions, requestToken: () => Promise<TokenResponse>) => Promise<TokenResponse>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(device: DeviceAuthorization, options: DevicePollOptions, requestToken: () => Promise<TokenResponse>): Promise<TokenResponse>",
      "description": "Poll until the person decides (RFC 8628 section 3.5). The wait comes before every poll; `slow_down`\nadds five seconds to every later wait; `authorization_pending` waits again; every other error (including\n`access_denied` and `expired_token`) ends the flow and is thrown as the service sent it. The device\ncode's own lifetime is enforced here too: no request is made once the next wait would pass it.\nA network failure is thrown, not retried: call this again with the same authorization to resume.",
      "parameters": [
        {
          "name": "device",
          "type": "DeviceAuthorization",
          "optional": false,
          "description": ""
        },
        {
          "name": "options",
          "type": "DevicePollOptions",
          "optional": false,
          "description": ""
        },
        {
          "name": "requestToken",
          "type": "() => Promise<TokenResponse>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<TokenResponse>"
    }
  ],
  "properties": []
}
PublicClientinterface
{
  "name": "PublicClient",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 260
  },
  "type": "PublicClient",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "allowed_resources",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "allowed_scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "application_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_name",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "directory_id",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "environment_id",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "grant_types",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": true,
      "type": "string | null | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "otp_backend_only",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "redirect_uris",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint_auth_method",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
Purchaseinterface
{
  "name": "Purchase",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 302
  },
  "type": "Purchase",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "created_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "currency",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "failure_code",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fulfilled_at",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "market",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "paid_at",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "payment_router",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "provider",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "refunded_at",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "subtotal_minor",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tax_minor",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_pack_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_pack_price_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_quantity",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "total_minor",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "updated_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
PushAuthorizationOptionsinterface
{
  "name": "PushAuthorizationOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 133
  },
  "type": "PushAuthorizationOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "codeChallenge",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "extra",
      "optional": true,
      "type": "Record<string, string> | undefined",
      "description": "More authorize parameters (`prompt`, `login_hint`, `max_age`, `organization` ...). Not allowed:\nanything that authenticates the client, `request`, `request_uri`, or a parameter this method\nalready owns.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "nonce",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "redirectUri",
      "optional": true,
      "type": "string | undefined",
      "description": "Overrides the client's configured redirect URI.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "state",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
PushedAuthorizationinterface
{
  "name": "PushedAuthorization",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 126
  },
  "type": "PushedAuthorization",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "Seconds it stays valid.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "request_uri",
      "optional": false,
      "type": "string",
      "description": "Opaque, single use, and only this client can present it.",
      "tags": [],
      "signatures": []
    }
  ]
}
ReconcileResultinterface
{
  "name": "ReconcileResult",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 358
  },
  "type": "ReconcileResult",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "payment_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "purchase_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reconciliation_required",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
refreshPolicyfunction

Refresh-token policy: `type === "refresh"` + sub/exp/iat.

{
  "name": "refreshPolicy",
  "kind": "function",
  "description": "Refresh-token policy: `type === \"refresh\"` + sub/exp/iat.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 53
  },
  "type": "() => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): ValidationPolicy",
      "description": "Refresh-token policy: `type === \"refresh\"` + sub/exp/iat.",
      "parameters": [],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
requireScopefunction
{
  "name": "requireScope",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 134
  },
  "type": "(user: { hasScope: (s: string) => boolean; }, scope: string) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(user: { hasScope: (s: string) => boolean; }, scope: string): void",
      "description": "",
      "parameters": [
        {
          "name": "user",
          "type": "{ hasScope: (s: string) => boolean; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "scope",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
ResourceProposalinterface

An inert customer proposal, not an approval or domain-ownership proof.

{
  "name": "ResourceProposal",
  "kind": "interface",
  "description": "An inert customer proposal, not an approval or domain-ownership proof.",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 192
  },
  "type": "ResourceProposal",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "directory_id",
      "optional": false,
      "type": "string",
      "description": "Raw directory UUID or the existing typed opaque directory Node ID.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "proposed_scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource_uri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ResourceRegistrationinterface
{
  "name": "ResourceRegistration",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 198
  },
  "type": "ResourceRegistration",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "account_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "approved_scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "created_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "directory_id",
      "optional": false,
      "type": "string",
      "description": "Raw directory UUID or the existing typed opaque directory Node ID.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "environment_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "proposed_by_user_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "proposed_scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "public_clients",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource_uri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reviewed_at",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reviewed_by_user_id",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "ResourceStatus",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "updated_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ResourceStatustype
{
  "name": "ResourceStatus",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 190
  },
  "type": "ResourceStatus",
  "constructors": [],
  "signatures": [],
  "properties": []
}
SaasClientclass
{
  "name": "SaasClient",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/saas.ts",
    "line": 37
  },
  "type": "typeof SaasClient",
  "constructors": [
    {
      "signature": "new (config: SaasClientConfig): SaasClient",
      "description": "",
      "parameters": [
        {
          "name": "config",
          "type": "SaasClientConfig",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "SaasClient"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "acceptTeamInvitation",
      "optional": false,
      "type": "(token: string, invitationToken: string) => Promise<Membership>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, invitationToken: string): Promise<Membership>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "invitationToken",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Membership>"
        }
      ]
    },
    {
      "name": "changeMemberRole",
      "optional": false,
      "type": "(token: string, accountId: string, userId: string, role: string, opts?: { proofId?: string; }) => Promise<Membership>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, userId: string, role: string, opts?: { proofId?: string; }): Promise<Membership>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "userId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "role",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "{ proofId?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Membership>"
        }
      ]
    },
    {
      "name": "createAccount",
      "optional": false,
      "type": "(token: string, input: CreateAccountInput) => Promise<Account>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, input: CreateAccountInput): Promise<Account>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "CreateAccountInput",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Account>"
        }
      ]
    },
    {
      "name": "createApplication",
      "optional": false,
      "type": "(token: string, accountId: string, input: CreateApplicationInput) => Promise<Application>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, input: CreateApplicationInput): Promise<Application>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "CreateApplicationInput",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Application>"
        }
      ]
    },
    {
      "name": "createCheckout",
      "optional": false,
      "type": "(token: string, accountId: string, input: { tokenPackPriceId: string; }, opts: { idempotencyKey: string; proofId?: string; }) => Promise<CheckoutResult>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, input: { tokenPackPriceId: string; }, opts: { idempotencyKey: string; proofId?: string; }): Promise<CheckoutResult>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "{ tokenPackPriceId: string; }",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "{ idempotencyKey: string; proofId?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CheckoutResult>"
        }
      ]
    },
    {
      "name": "createPublicClient",
      "optional": false,
      "type": "(token: string, accountId: string, applicationId: string, input: { name: string; client_id: string; issuer: string; application_type: string; redirect_uris: string[]; allowed_scopes?: string[]; allowed_resources?: string[]; directory_id?: string; otp_backend_only?: boolean; }) => Promise<PublicClient>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, applicationId: string, input: { name: string; client_id: string; issuer: string; application_type: string; redirect_uris: string[]; allowed_scopes?: string[]; allowed_resources?: string[]; directory_id?: string; otp_backend_only?: boolean; }): Promise<PublicClient>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "applicationId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "{ name: string; client_id: string; issuer: string; application_type: string; redirect_uris: string[]; allowed_scopes?: string[]; allowed_resources?: string[]; directory_id?: string; otp_backend_only?: boolean; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<PublicClient>"
        }
      ]
    },
    {
      "name": "createTeamInvitation",
      "optional": false,
      "type": "(token: string, accountId: string, input: { email: string; role: string; expires_in_hours?: number; }, opts?: { proofId?: string; }) => Promise<CreatedInvitation>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, input: { email: string; role: string; expires_in_hours?: number; }, opts?: { proofId?: string; }): Promise<CreatedInvitation>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "{ email: string; role: string; expires_in_hours?: number; }",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "{ proofId?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CreatedInvitation>"
        }
      ]
    },
    {
      "name": "getCatalog",
      "optional": false,
      "type": "(opts: { market: string; currency?: string; }, token?: string) => Promise<CatalogPrice[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { market: string; currency?: string; }, token?: string): Promise<CatalogPrice[]>",
          "description": "",
          "parameters": [
            {
              "name": "opts",
              "type": "{ market: string; currency?: string; }",
              "optional": false,
              "description": ""
            },
            {
              "name": "token",
              "type": "string | undefined",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CatalogPrice[]>"
        }
      ]
    },
    {
      "name": "getOverview",
      "optional": false,
      "type": "(token: string) => Promise<ConsoleOverview>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Promise<ConsoleOverview>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<ConsoleOverview>"
        }
      ]
    },
    {
      "name": "getWallet",
      "optional": false,
      "type": "(token: string, accountId: string) => Promise<WalletBalance>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string): Promise<WalletBalance>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<WalletBalance>"
        }
      ]
    },
    {
      "name": "listAccounts",
      "optional": false,
      "type": "(token: string) => Promise<Account[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Promise<Account[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Account[]>"
        }
      ]
    },
    {
      "name": "listApplications",
      "optional": false,
      "type": "(token: string, accountId: string) => Promise<Application[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string): Promise<Application[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Application[]>"
        }
      ]
    },
    {
      "name": "listPublicClients",
      "optional": false,
      "type": "(token: string, accountId: string, applicationId: string) => Promise<PublicClient[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, applicationId: string): Promise<PublicClient[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "applicationId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<PublicClient[]>"
        }
      ]
    },
    {
      "name": "listPurchases",
      "optional": false,
      "type": "(token: string, accountId: string, limit?: number) => Promise<Purchase[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, limit?: number): Promise<Purchase[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "limit",
              "type": "number | undefined",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Purchase[]>"
        }
      ]
    },
    {
      "name": "listResources",
      "optional": false,
      "type": "(token: string, accountId: string, after?: string) => Promise<ResourceRegistration[]>",
      "description": "One page, at most 100 records. Continue with the last raw registration UUID.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, after?: string): Promise<ResourceRegistration[]>",
          "description": "One page, at most 100 records. Continue with the last raw registration UUID.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "after",
              "type": "string | undefined",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<ResourceRegistration[]>"
        }
      ]
    },
    {
      "name": "listTeamInvitations",
      "optional": false,
      "type": "(token: string, accountId: string) => Promise<Invitation[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string): Promise<Invitation[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Invitation[]>"
        }
      ]
    },
    {
      "name": "listTeamMembers",
      "optional": false,
      "type": "(token: string, accountId: string) => Promise<TeamMember[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string): Promise<TeamMember[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TeamMember[]>"
        }
      ]
    },
    {
      "name": "listUsage",
      "optional": false,
      "type": "(token: string, accountId: string, limit?: number) => Promise<LedgerEntry[]>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, limit?: number): Promise<LedgerEntry[]>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "limit",
              "type": "number | undefined",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LedgerEntry[]>"
        }
      ]
    },
    {
      "name": "proposeResource",
      "optional": false,
      "type": "(token: string, accountId: string, input: ResourceProposal) => Promise<ResourceRegistration>",
      "description": "Proposal only; operator review remains a separate authority.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, input: ResourceProposal): Promise<ResourceRegistration>",
          "description": "Proposal only; operator review remains a separate authority.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "ResourceProposal",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<ResourceRegistration>"
        }
      ]
    },
    {
      "name": "reconcileCheckoutReturn",
      "optional": false,
      "type": "(token: string, accountId: string, purchaseId: string) => Promise<ReconcileResult>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, purchaseId: string): Promise<ReconcileResult>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "purchaseId",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<ReconcileResult>"
        }
      ]
    },
    {
      "name": "removeTeamMember",
      "optional": false,
      "type": "(token: string, accountId: string, userId: string, opts?: { proofId?: string; }) => Promise<void>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, userId: string, opts?: { proofId?: string; }): Promise<void>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "userId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "{ proofId?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<void>"
        }
      ]
    },
    {
      "name": "updateApplication",
      "optional": false,
      "type": "(token: string, accountId: string, applicationId: string, input: { name?: string; slug?: string; }) => Promise<Application>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, accountId: string, applicationId: string, input: { name?: string; slug?: string; }): Promise<Application>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "accountId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "applicationId",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "{ name?: string; slug?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Application>"
        }
      ]
    }
  ]
}
SdkConfiginterface
{
  "name": "SdkConfig",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 367
  },
  "type": "SdkConfig",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "Expected audience (resource URI) for token verification",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientAssertionKey",
      "optional": true,
      "type": "ClientAssertionKey | undefined",
      "description": "Key for `private_key_jwt` (RFC 7523): implies that method, and excludes a client secret. The service accepts it at the token and PAR endpoints only.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientId",
      "optional": true,
      "type": "string | undefined",
      "description": "OAuth client id (omit for discovery/JWKS-only usage)",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientSecret",
      "optional": true,
      "type": "string | undefined",
      "description": "OAuth client secret — NEVER pass to browser entrypoint",
      "tags": [],
      "signatures": []
    },
    {
      "name": "dpop",
      "optional": true,
      "type": "DpopKey | undefined",
      "description": "A DPoP key (RFC 9449): the code exchange and refresh send a proof, and the issued tokens are bound to this key.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "Custom fetch for testing / edge runtimes",
      "tags": [],
      "signatures": []
    },
    {
      "name": "httpTimeoutMs",
      "optional": true,
      "type": "number | undefined",
      "description": "HTTP timeout ms (default 10_000)",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "Issuer base URL e.g. https://auth.beyondigital.in",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwksCacheTtlSec",
      "optional": true,
      "type": "number | undefined",
      "description": "JWKS cache TTL seconds (default 300)",
      "tags": [],
      "signatures": []
    },
    {
      "name": "redirectUri",
      "optional": true,
      "type": "string | undefined",
      "description": "Registered redirect URI for auth-code flow",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": true,
      "type": "string[] | undefined",
      "description": "Default scopes to request",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tokenEndpointAuthMethod",
      "optional": true,
      "type": "\"none\" | \"client_secret_basic\" | \"client_secret_post\" | \"private_key_jwt\" | undefined",
      "description": "Registered client authentication method; defaults to Basic with a secret, none otherwise.",
      "tags": [],
      "signatures": []
    }
  ]
}
ServerOtpBindingtype

Session mode requires an explicit client and environment bound to the server key.

{
  "name": "ServerOtpBinding",
  "kind": "type",
  "description": "Session mode requires an explicit client and environment bound to the server key.",
  "tags": [],
  "source": {
    "file": "src/otp.ts",
    "line": 19
  },
  "type": "ServerOtpBinding",
  "constructors": [],
  "signatures": [],
  "properties": []
}
TeamMemberinterface
{
  "name": "TeamMember",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 323
  },
  "type": "TeamMember",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "created_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "full_name",
      "optional": false,
      "type": "string | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "membership_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "role",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "user_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
TOKEN_EXCHANGE_GRANTvalue
{
  "name": "TOKEN_EXCHANGE_GRANT",
  "kind": "value",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 13
  },
  "type": "\"urn:ietf:params:oauth:grant-type:token-exchange\"",
  "constructors": [],
  "signatures": [],
  "properties": []
}
TOKEN_TYPE_ACCESS_TOKENvalue

The only token type the service exchanges (`subject_token_type`, `actor_token_type`, `requested_token_type`).

{
  "name": "TOKEN_TYPE_ACCESS_TOKEN",
  "kind": "value",
  "description": "The only token type the service exchanges (`subject_token_type`, `actor_token_type`, `requested_token_type`).",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 15
  },
  "type": "\"urn:ietf:params:oauth:token-type:access_token\"",
  "constructors": [],
  "signatures": [],
  "properties": []
}
TokenPurposetype
{
  "name": "TokenPurpose",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 21
  },
  "type": "TokenPurpose",
  "constructors": [],
  "signatures": [],
  "properties": []
}
TokenResponseinterface
{
  "name": "TokenResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 59
  },
  "type": "TokenResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "access_token",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id_token",
      "optional": true,
      "type": "string | undefined",
      "description": "Optional ID token. OTP supplies a fresh receipt only for an explicitly nonce-bound server session. Refresh is not fresh-login evidence.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issued_token_type",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 8693: the type of the token issued by a token exchange.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "refresh_token",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "session_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_type",
      "optional": false,
      "type": "\"DPoP\" | \"Bearer\"",
      "description": "`DPoP` when the tokens were bound to a DPoP key (RFC 9449): present them under the DPoP scheme with a proof.",
      "tags": [],
      "signatures": []
    }
  ]
}
TokenVerifierclass

Single-issuer verifier: the original API, as a one-issuer `MultiIssuerVerifier`.

{
  "name": "TokenVerifier",
  "kind": "class",
  "description": "Single-issuer verifier: the original API, as a one-issuer\n`MultiIssuerVerifier`.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 562
  },
  "type": "typeof TokenVerifier",
  "constructors": [
    {
      "signature": "new (opts: VerifierOptions): TokenVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "VerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "TokenVerifier"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "decodeUnverified",
      "optional": false,
      "type": "(token: string) => Record<string, unknown>",
      "description": "Decode without verification (debug only).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Record<string, unknown>",
          "description": "Decode without verification (debug only).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Record<string, unknown>"
        }
      ]
    },
    {
      "name": "issuers",
      "optional": false,
      "type": "string[]",
      "description": "The normalised issuer allow-list, in configuration order.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "setIssuerJwksUri",
      "optional": false,
      "type": "(issuerUrl: string, uri: string) => void",
      "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
      "tags": [],
      "signatures": [
        {
          "signature": "(issuerUrl: string, uri: string): void",
          "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
          "parameters": [
            {
              "name": "issuerUrl",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "setJwksUri",
      "optional": false,
      "type": "(uri: string) => void",
      "description": "Set/override the JWKS URI after discovery (client.discover() will set this automatically).",
      "tags": [],
      "signatures": [
        {
          "signature": "(uri: string): void",
          "description": "Set/override the JWKS URI after discovery (client.discover() will set this automatically).",
          "parameters": [
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "verify",
      "optional": false,
      "type": "(token: string, opts?: VerifyOptions) => Promise<CurrentUser>",
      "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts?: VerifyOptions): Promise<CurrentUser>",
          "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CurrentUser>"
        }
      ]
    },
    {
      "name": "verifyClaims",
      "optional": false,
      "type": "(token: string, policy: ValidationPolicy) => Promise<Record<string, unknown>>",
      "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, policy: ValidationPolicy): Promise<Record<string, unknown>>",
          "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "policy",
              "type": "ValidationPolicy",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, unknown>>"
        }
      ]
    },
    {
      "name": "verifyLogoutToken",
      "optional": false,
      "type": "(token: string, opts: VerifyLogoutTokenOptions) => Promise<LogoutToken>",
      "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts: VerifyLogoutTokenOptions): Promise<LogoutToken>",
          "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyLogoutTokenOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LogoutToken>"
        }
      ]
    }
  ]
}
UserInfoResponseinterface
{
  "name": "UserInfoResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 97
  },
  "type": "UserInfoResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "email",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email_verified",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone_number",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone_number_verified",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sub",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
validateAuthorizationResponsefunction

Validate the front-channel response against the original, single-use transaction. Callers own transaction persistence/expiry and must discard it before exchanging a code.

{
  "name": "validateAuthorizationResponse",
  "kind": "function",
  "description": "Validate the front-channel response against the original, single-use transaction.\nCallers own transaction persistence/expiry and must discard it before exchanging a code.",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 60
  },
  "type": "(callbackUrl: string, expected: { state: string; issuer: string; redirectUri: string; }) => { code: string; }",
  "constructors": [],
  "signatures": [
    {
      "signature": "(callbackUrl: string, expected: { state: string; issuer: string; redirectUri: string; }): { code: string; }",
      "description": "Validate the front-channel response against the original, single-use transaction.\nCallers own transaction persistence/expiry and must discard it before exchanging a code.",
      "parameters": [
        {
          "name": "callbackUrl",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "expected",
          "type": "{ state: string; issuer: string; redirectUri: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "{ code: string; }"
    }
  ],
  "properties": []
}
validateClaimsfunction

Bind a verified claim set to its purpose — byte-for-byte port of the service's `validate_claims`.

{
  "name": "validateClaims",
  "kind": "function",
  "description": "Bind a verified claim set to its purpose — byte-for-byte port of the\nservice's `validate_claims`.",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 116
  },
  "type": "(claims: Record<string, unknown>, policy: ValidationPolicy) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(claims: Record<string, unknown>, policy: ValidationPolicy): void",
      "description": "Bind a verified claim set to its purpose — byte-for-byte port of the\nservice's `validate_claims`.",
      "parameters": [
        {
          "name": "claims",
          "type": "Record<string, unknown>",
          "optional": false,
          "description": ""
        },
        {
          "name": "policy",
          "type": "ValidationPolicy",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
validateTypHeaderfunction
{
  "name": "validateTypHeader",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 84
  },
  "type": "(typ: string | undefined, policy: ValidationPolicy) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(typ: string | undefined, policy: ValidationPolicy): void",
      "description": "",
      "parameters": [
        {
          "name": "typ",
          "type": "string | undefined",
          "optional": false,
          "description": ""
        },
        {
          "name": "policy",
          "type": "ValidationPolicy",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
ValidationPolicyinterface
{
  "name": "ValidationPolicy",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 25
  },
  "type": "ValidationPolicy",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "expectedAudiences",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "purpose",
      "optional": false,
      "type": "TokenPurpose",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "requireAtJwt",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "trustedIssuers",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
VerifierOptionsinterface
{
  "name": "VerifierOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 78
  },
  "type": "VerifierOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": false,
      "type": "string | string[]",
      "description": "Audience(s) this resource server accepts (required): a token minted for a\ndifferent resource is rejected. A verifier with no audience pin would\naccept any token an issuer ever signed.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clockSkewSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "Exact issuer to pin (required).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwksCacheTtlSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "minJwksFetchIntervalMs",
      "optional": true,
      "type": "number | undefined",
      "description": "Minimum ms between JWKS fetch attempts, per issuer. Default 10_000; 0\ndisables.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "requireAtJwt",
      "optional": true,
      "type": "boolean | undefined",
      "description": "RFC 9068 typ enforcement on verify(). Default on; set false only for\npre-WP-03b mints. Prefer `verifyClaims()` with an explicit policy for\nnon-access purposes.",
      "tags": [],
      "signatures": []
    }
  ]
}
VerifyLogoutTokenOptionsinterface
{
  "name": "VerifyLogoutTokenOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 53
  },
  "type": "VerifyLogoutTokenOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "clientId",
      "optional": false,
      "type": "string | string[]",
      "description": "The OAuth client id(s) this relying party is: the token's `aud` must include one of them. Required.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "consumeJti",
      "optional": true,
      "type": "((jti: string, expiresAt: number) => boolean | Promise<boolean>) | undefined",
      "description": "Replay protection (OPTIONAL in the specification): called once with `jti` after every other check\npassed; return `false` when that `jti` was seen before. The service re-sends a delivery with the\nsame `jti` until it gets a 2xx, so record the `jti` only once you have ended the session, or a\nretry after your own failure will be refused as a replay.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "maxAgeSeconds",
      "optional": true,
      "type": "number | undefined",
      "description": "Refuse a token issued longer ago than this. Default 600, must be positive.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "now",
      "optional": true,
      "type": "number | undefined",
      "description": "Unix seconds. Defaults to now.",
      "tags": [],
      "signatures": []
    }
  ]
}
VerifyOptionsinterface
{
  "name": "VerifyOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 394
  },
  "type": "VerifyOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clockSkewSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
WalletBalanceinterface

Prepaid authentication usage units, not a monetary account balance.

{
  "name": "WalletBalance",
  "kind": "interface",
  "description": "Prepaid authentication usage units, not a monetary account balance.",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 277
  },
  "type": "WalletBalance",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "account_id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "available_balance",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "is_first_party",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reserved_balance",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "updated_at",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "version",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
withExpectedAudiencesfunction
{
  "name": "withExpectedAudiences",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 67
  },
  "type": "(policy: ValidationPolicy, audiences: string[]) => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(policy: ValidationPolicy, audiences: string[]): ValidationPolicy",
      "description": "",
      "parameters": [
        {
          "name": "policy",
          "type": "ValidationPolicy",
          "optional": false,
          "description": ""
        },
        {
          "name": "audiences",
          "type": "string[]",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}
withTrustedIssuersfunction
{
  "name": "withTrustedIssuers",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/policy.ts",
    "line": 63
  },
  "type": "(policy: ValidationPolicy, issuers: string[]) => ValidationPolicy",
  "constructors": [],
  "signatures": [
    {
      "signature": "(policy: ValidationPolicy, issuers: string[]): ValidationPolicy",
      "description": "",
      "parameters": [
        {
          "name": "policy",
          "type": "ValidationPolicy",
          "optional": false,
          "description": ""
        },
        {
          "name": "issuers",
          "type": "string[]",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ValidationPolicy"
    }
  ],
  "properties": []
}

@beyondigital/auth-sdk/browser

assertDpopSupportedfunction

The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.

{
  "name": "assertDpopSupported",
  "kind": "function",
  "description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 122
  },
  "type": "(metadata: { dpop_signing_alg_values_supported?: string[]; }, key: DpopKey) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(metadata: { dpop_signing_alg_values_supported?: string[]; }, key: DpopKey): void",
      "description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.",
      "parameters": [
        {
          "name": "metadata",
          "type": "{ dpop_signing_alg_values_supported?: string[]; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
base64UrlEncodefunction
{
  "name": "base64UrlEncode",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 13
  },
  "type": "(buf: Uint8Array) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(buf: Uint8Array): string",
      "description": "",
      "parameters": [
        {
          "name": "buf",
          "type": "Uint8Array<ArrayBufferLike>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
BrowserAuthClientclass
{
  "name": "BrowserAuthClient",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/browser.ts",
    "line": 54
  },
  "type": "typeof BrowserAuthClient",
  "constructors": [
    {
      "signature": "new (config: BrowserAuthConfig): BrowserAuthClient",
      "description": "",
      "parameters": [
        {
          "name": "config",
          "type": "BrowserAuthConfig",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "BrowserAuthClient"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "clientId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "createAuthorizationUrl",
      "optional": false,
      "type": "(opts: { scope?: string; state?: string; nonce?: string; codeChallenge: string; resource?: string | string[]; }) => string",
      "description": "Build the authorization URL (always PKCE S256, public client).",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { scope?: string; state?: string; nonce?: string; codeChallenge: string; resource?: string | string[]; }): string",
          "description": "Build the authorization URL (always PKCE S256, public client).",
          "parameters": [
            {
              "name": "opts",
              "type": "{ scope?: string; state?: string; nonce?: string; codeChallenge: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "createAuthorizationUrlFromRequestUri",
      "optional": false,
      "type": "(requestUri: string) => string",
      "description": "The authorize URL for a pushed request: `client_id` and `request_uri` only.",
      "tags": [],
      "signatures": [
        {
          "signature": "(requestUri: string): string",
          "description": "The authorize URL for a pushed request: `client_id` and `request_uri` only.",
          "parameters": [
            {
              "name": "requestUri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "createEndSessionUrl",
      "optional": false,
      "type": "(opts?: { idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }) => string",
      "description": "The URL to send the browser to in order to end the session at the service.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts?: { idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }): string",
          "description": "The URL to send the browser to in order to end the session at the service.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ idTokenHint?: string; postLogoutRedirectUri?: string; state?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "string"
        }
      ]
    },
    {
      "name": "discover",
      "optional": false,
      "type": "() => Promise<OidcMetadata>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): Promise<OidcMetadata>",
          "description": "",
          "parameters": [],
          "returns": "Promise<OidcMetadata>"
        }
      ]
    },
    {
      "name": "exchangeCode",
      "optional": false,
      "type": "(opts: { code: string; codeVerifier: string; resource?: string | string[]; }) => Promise<TokenResponse>",
      "description": "Exchange an authorization code for tokens — public client, no secret.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { code: string; codeVerifier: string; resource?: string | string[]; }): Promise<TokenResponse>",
          "description": "Exchange an authorization code for tokens — public client, no secret.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ code: string; codeVerifier: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "pushAuthorizationRequest",
      "optional": false,
      "type": "(opts: PushAuthorizationOptions) => Promise<PushedAuthorization>",
      "description": "Push the authorize parameters to the service (RFC 9126) and get a one-use `request_uri` back: the browser then carries nothing the person could read or edit. Public client: no secret.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: PushAuthorizationOptions): Promise<PushedAuthorization>",
          "description": "Push the authorize parameters to the service (RFC 9126) and get a one-use `request_uri` back: the browser then carries nothing the person could read or edit. Public client: no secret.",
          "parameters": [
            {
              "name": "opts",
              "type": "PushAuthorizationOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<PushedAuthorization>"
        }
      ]
    },
    {
      "name": "redirectUri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "refresh",
      "optional": false,
      "type": "(opts: { refreshToken: string; resource?: string | string[]; }) => Promise<TokenResponse>",
      "description": "Refresh — public client, no secret.",
      "tags": [],
      "signatures": [
        {
          "signature": "(opts: { refreshToken: string; resource?: string | string[]; }): Promise<TokenResponse>",
          "description": "Refresh — public client, no secret.",
          "parameters": [
            {
              "name": "opts",
              "type": "{ refreshToken: string; resource?: string | string[]; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<TokenResponse>"
        }
      ]
    },
    {
      "name": "revoke",
      "optional": false,
      "type": "(token: string) => Promise<void>",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Promise<void>",
          "description": "",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<void>"
        }
      ]
    }
  ]
}
BrowserAuthConfiginterface
{
  "name": "BrowserAuthConfig",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/browser.ts",
    "line": 43
  },
  "type": "BrowserAuthConfig",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "clientId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "dpop",
      "optional": true,
      "type": "DpopKey | undefined",
      "description": "A DPoP key (RFC 9449): the code exchange and refresh send a proof and the issued tokens are bound to this key. Keep the key non-extractable in the page (the default of `generateDpopKey`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "httpTimeoutMs",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "redirectUri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
browserGenerateCodeChallengeAsyncfunction
{
  "name": "browserGenerateCodeChallengeAsync",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 7
  },
  "type": "(verifier: string) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(verifier: string): Promise<string>",
      "description": "",
      "parameters": [
        {
          "name": "verifier",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
browserGenerateCodeVerifierfunction

Universal OAuth URL and WebCrypto helpers. No Node builtins.

{
  "name": "browserGenerateCodeVerifier",
  "kind": "function",
  "description": "Universal OAuth URL and WebCrypto helpers. No Node builtins.",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 2
  },
  "type": "() => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(): string",
      "description": "Universal OAuth URL and WebCrypto helpers. No Node builtins.",
      "parameters": [],
      "returns": "string"
    }
  ],
  "properties": []
}
buildAuthorizationUrlfunction
{
  "name": "buildAuthorizationUrl",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 31
  },
  "type": "(params: AuthorizationUrlParams) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(params: AuthorizationUrlParams): string",
      "description": "",
      "parameters": [
        {
          "name": "params",
          "type": "AuthorizationUrlParams",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
buildAuthorizationUrlFromRequestUrifunction

The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).

{
  "name": "buildAuthorizationUrlFromRequestUri",
  "kind": "function",
  "description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 183
  },
  "type": "(issuerUrl: string, clientId: string, requestUri: string) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(issuerUrl: string, clientId: string, requestUri: string): string",
      "description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).",
      "parameters": [
        {
          "name": "issuerUrl",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "clientId",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "requestUri",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
buildEndSessionUrlfunction

The URL to send the person's browser to in order to end their session at the service.

{
  "name": "buildEndSessionUrl",
  "kind": "function",
  "description": "The URL to send the person's browser to in order to end their session at the service.",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 135
  },
  "type": "(options: EndSessionUrlOptions) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(options: EndSessionUrlOptions): string",
      "description": "The URL to send the person's browser to in order to end their session at the service.",
      "parameters": [
        {
          "name": "options",
          "type": "EndSessionUrlOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
createDpopProoffunction
{
  "name": "createDpopProof",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 105
  },
  "type": "(key: DpopKey, options: DpopProofOptions) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(key: DpopKey, options: DpopProofOptions): Promise<string>",
      "description": "",
      "parameters": [
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        },
        {
          "name": "options",
          "type": "DpopProofOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
createMultiIssuerVerifierfunction
{
  "name": "createMultiIssuerVerifier",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 584
  },
  "type": "(opts: MultiIssuerVerifierOptions) => MultiIssuerVerifier",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: MultiIssuerVerifierOptions): MultiIssuerVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "MultiIssuerVerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "MultiIssuerVerifier"
    }
  ],
  "properties": []
}
createVerifierfunction
{
  "name": "createVerifier",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 580
  },
  "type": "(opts: VerifierOptions) => TokenVerifier",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: VerifierOptions): TokenVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "VerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "TokenVerifier"
    }
  ],
  "properties": []
}
CurrentUserinterface
{
  "name": "CurrentUser",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 132
  },
  "type": "CurrentUser",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "app",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "authUserId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "centralIdentityId",
      "optional": false,
      "type": "string",
      "description": "Central auth identity for compatibility flows",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "firmId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "hasScope",
      "optional": false,
      "type": "(scope: string) => boolean",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(scope: string): boolean",
          "description": "",
          "parameters": [
            {
              "name": "scope",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "boolean"
        }
      ]
    },
    {
      "name": "id",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "identityClass",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isActive",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isAdmin",
      "optional": false,
      "type": "() => boolean",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): boolean",
          "description": "",
          "parameters": [],
          "returns": "boolean"
        }
      ]
    },
    {
      "name": "issuer",
      "optional": true,
      "type": "string | undefined",
      "description": "The verified token's issuer (the allow-listed issuer that signed it).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "isSystemAdmin",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "permissionsVersion",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sessionId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "tokenVersion",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
dpopAccessTokenHashfunction

`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).

{
  "name": "dpopAccessTokenHash",
  "kind": "function",
  "description": "`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 53
  },
  "type": "(accessToken: string) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(accessToken: string): Promise<string>",
      "description": "`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).",
      "parameters": [
        {
          "name": "accessToken",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
DpopAlgorithmtype
{
  "name": "DpopAlgorithm",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 23
  },
  "type": "SigningAlgorithm",
  "constructors": [],
  "signatures": [],
  "properties": []
}
dpopHtufunction

`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.

{
  "name": "dpopHtu",
  "kind": "function",
  "description": "`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 59
  },
  "type": "(url: string) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(url: string): string",
      "description": "`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.",
      "parameters": [
        {
          "name": "url",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
DpopKeyclass

A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.

{
  "name": "DpopKey",
  "kind": "class",
  "description": "A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 28
  },
  "type": "typeof DpopKey",
  "constructors": [
    {
      "signature": "new (alg: DpopAlgorithm, publicJwk: JWK, thumbprint: string, privateKey: KeyLike | Uint8Array): DpopKey",
      "description": "",
      "parameters": [
        {
          "name": "alg",
          "type": "SigningAlgorithm",
          "optional": false,
          "description": ""
        },
        {
          "name": "publicJwk",
          "type": "JWK",
          "optional": false,
          "description": ""
        },
        {
          "name": "thumbprint",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "privateKey",
          "type": "KeyLike | Uint8Array<ArrayBufferLike>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "DpopKey"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "alg",
      "optional": false,
      "type": "SigningAlgorithm",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "publicJwk",
      "optional": false,
      "type": "JWK",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "thumbprint",
      "optional": false,
      "type": "string",
      "description": "RFC 7638 SHA-256 thumbprint of the public key: the `jkt` the service binds tokens to.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }",
          "description": "",
          "parameters": [],
          "returns": "{ alg: DpopAlgorithm; publicJwk: JWK; thumbprint: string; }"
        }
      ]
    }
  ]
}
DpopProofOptionsinterface
{
  "name": "DpopProofOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 90
  },
  "type": "DpopProofOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "accessToken",
      "optional": true,
      "type": "string | undefined",
      "description": "Include `ath` for a resource request made with this access token.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jti",
      "optional": true,
      "type": "string | undefined",
      "description": "Defaults to a random UUID: every proof must have its own.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "method",
      "optional": false,
      "type": "string",
      "description": "The HTTP method of the request the proof is for. Upper-cased.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "nonce",
      "optional": true,
      "type": "string | undefined",
      "description": "A nonce the server gave (RFC 9449 section 8).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "now",
      "optional": true,
      "type": "number | undefined",
      "description": "Unix seconds. Defaults to now.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "url",
      "optional": false,
      "type": "string",
      "description": "The request URL; its query and fragment are not part of the proof.",
      "tags": [],
      "signatures": []
    }
  ]
}
DpopSessionclass

Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.

{
  "name": "DpopSession",
  "kind": "class",
  "description": "Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 137
  },
  "type": "typeof DpopSession",
  "constructors": [
    {
      "signature": "new (key: DpopKey): DpopSession",
      "description": "",
      "parameters": [
        {
          "name": "key",
          "type": "DpopKey",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "DpopSession"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "fetch",
      "optional": false,
      "type": "(fetcher: Fetcher, url: string, init?: RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>), options?: { accessToken?: string; }) => Promise<Response>",
      "description": "`fetcher(url, init)` is called with the proof added. `init.headers` must be a plain object; a\n`DPoP` header the caller set is replaced. `accessToken` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`init` may be a function of the attempt number (0, then 1 on the one retry after a nonce\nchallenge): it is called again for the retry, so a request that carries a single-use credential\n(a `private_key_jwt` assertion) can mint a new one instead of replaying the first.",
      "tags": [],
      "signatures": [
        {
          "signature": "(fetcher: Fetcher, url: string, init?: RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>), options?: { accessToken?: string; }): Promise<Response>",
          "description": "`fetcher(url, init)` is called with the proof added. `init.headers` must be a plain object; a\n`DPoP` header the caller set is replaced. `accessToken` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`init` may be a function of the attempt number (0, then 1 on the one retry after a nonce\nchallenge): it is called again for the retry, so a request that carries a single-use credential\n(a `private_key_jwt` assertion) can mint a new one instead of replaying the first.",
          "parameters": [
            {
              "name": "fetcher",
              "type": "Fetcher",
              "optional": false,
              "description": ""
            },
            {
              "name": "url",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "init",
              "type": "RequestInit | ((attempt: number) => RequestInit | Promise<RequestInit>)",
              "optional": false,
              "description": ""
            },
            {
              "name": "options",
              "type": "{ accessToken?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Response>"
        }
      ]
    },
    {
      "name": "headers",
      "optional": false,
      "type": "(request: { method: string; url: string; accessToken?: string; }) => Promise<Record<string, string>>",
      "description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a token goes with it.",
      "tags": [],
      "signatures": [
        {
          "signature": "(request: { method: string; url: string; accessToken?: string; }): Promise<Record<string, string>>",
          "description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a token goes with it.",
          "parameters": [
            {
              "name": "request",
              "type": "{ method: string; url: string; accessToken?: string; }",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, string>>"
        }
      ]
    },
    {
      "name": "key",
      "optional": false,
      "type": "DpopKey",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
dpopThumbprintfunction

RFC 7638 thumbprint (base64url SHA-256) of a public JWK.

{
  "name": "dpopThumbprint",
  "kind": "function",
  "description": "RFC 7638 thumbprint (base64url SHA-256) of a public JWK.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 48
  },
  "type": "(jwk: JWK) => Promise<string>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(jwk: JWK): Promise<string>",
      "description": "RFC 7638 thumbprint (base64url SHA-256) of a public JWK.",
      "parameters": [
        {
          "name": "jwk",
          "type": "JWK",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<string>"
    }
  ],
  "properties": []
}
EndSessionUrlOptionsinterface
{
  "name": "EndSessionUrlOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/logout.ts",
    "line": 120
  },
  "type": "EndSessionUrlOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "endSessionEndpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "The discovered `end_session_endpoint`. Must be on the issuer's origin. Defaults to `<issuer>/oauth/end_session`.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "idTokenHint",
      "optional": true,
      "type": "string | undefined",
      "description": "The ID token the person signed in with. The service uses it to know which client is asking.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuerUrl",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "postLogoutRedirectUri",
      "optional": true,
      "type": "string | undefined",
      "description": "Where to send the person afterwards. Must be one of the client's registered redirect URIs; needs `idTokenHint`.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "state",
      "optional": true,
      "type": "string | undefined",
      "description": "Echoed back on the redirect; needs `postLogoutRedirectUri`.",
      "tags": [],
      "signatures": []
    }
  ]
}
generateDpopKeyfunction
{
  "name": "generateDpopKey",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 75
  },
  "type": "(alg?: DpopAlgorithm) => Promise<DpopKey>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(alg?: DpopAlgorithm): Promise<DpopKey>",
      "description": "",
      "parameters": [
        {
          "name": "alg",
          "type": "SigningAlgorithm",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<DpopKey>"
    }
  ],
  "properties": []
}
honoAuthfunction
{
  "name": "honoAuth",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 105
  },
  "type": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }) => (c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(opts: { verifier: AccessTokenVerifier; publicPaths?: string[]; }): (c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ verifier: AccessTokenVerifier; publicPaths?: string[]; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "(c: { req: { header: (k: string) => string | undefined; path: string; }; set: (k: string, v: unknown) => void; json: (b: unknown, s: number) => unknown; header: (k: string, v: string) => void; }, next: () => Promise<void>) => Promise<unknown>"
    }
  ],
  "properties": []
}
importDpopKeyfunction

Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.

{
  "name": "importDpopKey",
  "kind": "function",
  "description": "Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.",
  "tags": [],
  "source": {
    "file": "src/dpop.ts",
    "line": 83
  },
  "type": "(input: { alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }) => Promise<DpopKey>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(input: { alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }): Promise<DpopKey>",
      "description": "Use a key you already hold (a private JWK or a PKCS#8 PEM), for example one kept in secure storage.",
      "parameters": [
        {
          "name": "input",
          "type": "{ alg: DpopAlgorithm; privateJwk?: JWK; privatePem?: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<DpopKey>"
    }
  ],
  "properties": []
}
JwksResponseinterface
{
  "name": "JwksResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 53
  },
  "type": "JwksResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "keys",
      "optional": false,
      "type": "Jwk[]",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
JwtErrorclass
{
  "name": "JwtError",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 35
  },
  "type": "typeof JwtError",
  "constructors": [
    {
      "signature": "new (message: string, code?: JwtError[\"code\"]): JwtError",
      "description": "",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "code",
          "type": "\"expired\" | \"invalid\" | \"kid_mismatch\" | \"missing_key\" | \"audience_mismatch\" | \"issuer_mismatch\"",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "JwtError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": false,
      "type": "\"expired\" | \"invalid\" | \"kid_mismatch\" | \"missing_key\" | \"audience_mismatch\" | \"issuer_mismatch\"",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
MultiIssuerVerifierclass

Verifies access tokens from an explicit allow-list of issuers.

{
  "name": "MultiIssuerVerifier",
  "kind": "class",
  "description": "Verifies access tokens from an explicit allow-list of issuers.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 199
  },
  "type": "typeof MultiIssuerVerifier",
  "constructors": [
    {
      "signature": "new (opts: MultiIssuerVerifierOptions): MultiIssuerVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "MultiIssuerVerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "MultiIssuerVerifier"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "decodeUnverified",
      "optional": false,
      "type": "(token: string) => Record<string, unknown>",
      "description": "Decode without verification (debug only).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Record<string, unknown>",
          "description": "Decode without verification (debug only).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Record<string, unknown>"
        }
      ]
    },
    {
      "name": "issuers",
      "optional": false,
      "type": "string[]",
      "description": "The normalised issuer allow-list, in configuration order.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "setIssuerJwksUri",
      "optional": false,
      "type": "(issuerUrl: string, uri: string) => void",
      "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
      "tags": [],
      "signatures": [
        {
          "signature": "(issuerUrl: string, uri: string): void",
          "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
          "parameters": [
            {
              "name": "issuerUrl",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "verify",
      "optional": false,
      "type": "(token: string, opts?: VerifyOptions) => Promise<CurrentUser>",
      "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts?: VerifyOptions): Promise<CurrentUser>",
          "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CurrentUser>"
        }
      ]
    },
    {
      "name": "verifyClaims",
      "optional": false,
      "type": "(token: string, policy: ValidationPolicy) => Promise<Record<string, unknown>>",
      "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, policy: ValidationPolicy): Promise<Record<string, unknown>>",
          "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "policy",
              "type": "ValidationPolicy",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, unknown>>"
        }
      ]
    },
    {
      "name": "verifyLogoutToken",
      "optional": false,
      "type": "(token: string, opts: VerifyLogoutTokenOptions) => Promise<LogoutToken>",
      "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts: VerifyLogoutTokenOptions): Promise<LogoutToken>",
          "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyLogoutTokenOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LogoutToken>"
        }
      ]
    }
  ]
}
NetworkErrorclass
{
  "name": "NetworkError",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 44
  },
  "type": "typeof NetworkError",
  "constructors": [
    {
      "signature": "new (message: string, cause?: unknown): NetworkError",
      "description": "",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "cause",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "NetworkError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
nextVerifyRequestfunction
{
  "name": "nextVerifyRequest",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 88
  },
  "type": "(request: { headers: { get: (k: string) => string | null; }; }, verifier: AccessTokenVerifier) => Promise<{ user: unknown; } | { error: string; status: 401; }>",
  "constructors": [],
  "signatures": [
    {
      "signature": "(request: { headers: { get: (k: string) => string | null; }; }, verifier: AccessTokenVerifier): Promise<{ user: unknown; } | { error: string; status: 401; }>",
      "description": "",
      "parameters": [
        {
          "name": "request",
          "type": "{ headers: { get: (k: string) => string | null; }; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "verifier",
          "type": "AccessTokenVerifier",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "Promise<{ user: unknown; } | { error: string; status: 401; }>"
    }
  ],
  "properties": []
}
OAuthErrorclass

Errors for

{
  "name": "OAuthError",
  "kind": "class",
  "description": "Errors for",
  "tags": [
    {
      "name": "beyondigital",
      "text": "/auth-sdk"
    }
  ],
  "source": {
    "file": "src/errors.ts",
    "line": 5
  },
  "type": "typeof OAuthError",
  "constructors": [
    {
      "signature": "new (opts: { error: string; error_description?: string; status: number; statusText?: string; }): OAuthError",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "{ error: string; error_description?: string; status: number; statusText?: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "OAuthError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "error",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "errorDescription",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "statusText",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { name: string; error: string; error_description: string; status: number; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { name: string; error: string; error_description: string; status: number; }",
          "description": "",
          "parameters": [],
          "returns": "{ name: string; error: string; error_description: string; status: number; }"
        }
      ]
    }
  ]
}
OidcMetadatainterface
{
  "name": "OidcMetadata",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 11
  },
  "type": "OidcMetadata",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "authorization_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "authorization_response_iss_parameter_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "claims_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "client_id_metadata_document_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code_challenge_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "device_authorization_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 8628.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "dpop_signing_alg_values_supported",
      "optional": true,
      "type": "string[] | undefined",
      "description": "RFC 9449: the proof algorithms the token endpoint accepts.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "end_session_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "OIDC RP-Initiated Logout: where to send the browser to end the session.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "grant_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id_token_signing_alg_values_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "introspection_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "introspection_endpoint_auth_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "jwks_uri",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "pushed_authorization_request_endpoint",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 9126.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "registration_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "require_pushed_authorization_requests",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource_parameter_supported",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "response_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "revocation_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scopes_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "subject_types_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint_auth_methods_supported",
      "optional": false,
      "type": "string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_endpoint_auth_signing_alg_values_supported",
      "optional": true,
      "type": "string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "userinfo_endpoint",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
parseCallbackParamsfunction
{
  "name": "parseCallbackParams",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 47
  },
  "type": "(callbackUrl: string) => { code: string; state?: string; iss?: string; }",
  "constructors": [],
  "signatures": [
    {
      "signature": "(callbackUrl: string): { code: string; state?: string; iss?: string; }",
      "description": "",
      "parameters": [
        {
          "name": "callbackUrl",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "{ code: string; state?: string; iss?: string; }"
    }
  ],
  "properties": []
}
PushAuthorizationOptionsinterface
{
  "name": "PushAuthorizationOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 133
  },
  "type": "PushAuthorizationOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "codeChallenge",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "extra",
      "optional": true,
      "type": "Record<string, string> | undefined",
      "description": "More authorize parameters (`prompt`, `login_hint`, `max_age`, `organization` ...). Not allowed:\nanything that authenticates the client, `request`, `request_uri`, or a parameter this method\nalready owns.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "nonce",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "redirectUri",
      "optional": true,
      "type": "string | undefined",
      "description": "Overrides the client's configured redirect URI.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "resource",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "state",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
PushedAuthorizationinterface
{
  "name": "PushedAuthorization",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/flows.ts",
    "line": 126
  },
  "type": "PushedAuthorization",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "Seconds it stays valid.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "request_uri",
      "optional": false,
      "type": "string",
      "description": "Opaque, single use, and only this client can present it.",
      "tags": [],
      "signatures": []
    }
  ]
}
requireScopefunction
{
  "name": "requireScope",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/middleware.ts",
    "line": 134
  },
  "type": "(user: { hasScope: (s: string) => boolean; }, scope: string) => void",
  "constructors": [],
  "signatures": [
    {
      "signature": "(user: { hasScope: (s: string) => boolean; }, scope: string): void",
      "description": "",
      "parameters": [
        {
          "name": "user",
          "type": "{ hasScope: (s: string) => boolean; }",
          "optional": false,
          "description": ""
        },
        {
          "name": "scope",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "void"
    }
  ],
  "properties": []
}
TokenResponseinterface
{
  "name": "TokenResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 59
  },
  "type": "TokenResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "access_token",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "expires_in",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "id_token",
      "optional": true,
      "type": "string | undefined",
      "description": "Optional ID token. OTP supplies a fresh receipt only for an explicitly nonce-bound server session. Refresh is not fresh-login evidence.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issued_token_type",
      "optional": true,
      "type": "string | undefined",
      "description": "RFC 8693: the type of the token issued by a token exchange.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "refresh_token",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scope",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "session_id",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "token_type",
      "optional": false,
      "type": "\"DPoP\" | \"Bearer\"",
      "description": "`DPoP` when the tokens were bound to a DPoP key (RFC 9449): present them under the DPoP scheme with a proof.",
      "tags": [],
      "signatures": []
    }
  ]
}
TokenVerifierclass

Single-issuer verifier: the original API, as a one-issuer `MultiIssuerVerifier`.

{
  "name": "TokenVerifier",
  "kind": "class",
  "description": "Single-issuer verifier: the original API, as a one-issuer\n`MultiIssuerVerifier`.",
  "tags": [],
  "source": {
    "file": "src/jwt.ts",
    "line": 562
  },
  "type": "typeof TokenVerifier",
  "constructors": [
    {
      "signature": "new (opts: VerifierOptions): TokenVerifier",
      "description": "",
      "parameters": [
        {
          "name": "opts",
          "type": "VerifierOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "TokenVerifier"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "decodeUnverified",
      "optional": false,
      "type": "(token: string) => Record<string, unknown>",
      "description": "Decode without verification (debug only).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string): Record<string, unknown>",
          "description": "Decode without verification (debug only).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Record<string, unknown>"
        }
      ]
    },
    {
      "name": "issuers",
      "optional": false,
      "type": "string[]",
      "description": "The normalised issuer allow-list, in configuration order.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "setIssuerJwksUri",
      "optional": false,
      "type": "(issuerUrl: string, uri: string) => void",
      "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
      "tags": [],
      "signatures": [
        {
          "signature": "(issuerUrl: string, uri: string): void",
          "description": "Set/override one issuer's JWKS URI after discovery. The issuer must be\nallow-listed; its cache is dropped.",
          "parameters": [
            {
              "name": "issuerUrl",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "setJwksUri",
      "optional": false,
      "type": "(uri: string) => void",
      "description": "Set/override the JWKS URI after discovery (client.discover() will set this automatically).",
      "tags": [],
      "signatures": [
        {
          "signature": "(uri: string): void",
          "description": "Set/override the JWKS URI after discovery (client.discover() will set this automatically).",
          "parameters": [
            {
              "name": "uri",
              "type": "string",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "void"
        }
      ]
    },
    {
      "name": "verify",
      "optional": false,
      "type": "(token: string, opts?: VerifyOptions) => Promise<CurrentUser>",
      "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts?: VerifyOptions): Promise<CurrentUser>",
          "description": "Verify an access token and return the CurrentUser (with the verified\n`issuer`). The production surface: RFC 9068 `at+jwt` typ (unless\nconstructed requireAtJwt:false), the issuer allow-list + audience pins,\none bounded kid-miss refetch. `opts.issuer` may only narrow to one\nallow-listed issuer.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<CurrentUser>"
        }
      ]
    },
    {
      "name": "verifyClaims",
      "optional": false,
      "type": "(token: string, policy: ValidationPolicy) => Promise<Record<string, unknown>>",
      "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, policy: ValidationPolicy): Promise<Record<string, unknown>>",
          "description": "Verify `token` against `policy`: JOSE typ (when the purpose carries\n`at+jwt`), issuer allow-list (before any fetch), kid-pinned signature\nwith the key's own algorithm + expiry, then the claim contract (`type`,\nrequired claims, iss/aud allow-lists). Returns raw claims — the right\nreturn for non-user purposes (refresh, id_token, internal_assertion).",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "policy",
              "type": "ValidationPolicy",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<Record<string, unknown>>"
        }
      ]
    },
    {
      "name": "verifyLogoutToken",
      "optional": false,
      "type": "(token: string, opts: VerifyLogoutTokenOptions) => Promise<LogoutToken>",
      "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
      "tags": [],
      "signatures": [
        {
          "signature": "(token: string, opts: VerifyLogoutTokenOptions): Promise<LogoutToken>",
          "description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs to a\nclient's `backchannel_logout_uri`) and say which session or subject to end.\n\nIn order: the JOSE `typ` is `logout+jwt` (so an access token or an ID token can never pass as one);\n`iss` is on the issuer allow-list (before any JWKS request); the signature verifies under the key\nthe issuer publishes for the token's `kid`, with the algorithm the key dictates, and the token has\nnot expired; `aud` names this client; `iat`, `exp` and `jti` are present and `iat` is recent;\n`events` has the back-channel logout member as an object; there is no `nonce`; and `sub`, `sid` or\nboth are present. Anything else throws `LogoutTokenError` with a `reason` and a fixed message.\n\nRespond 200 (or 204) to the service only after this returns and you have ended the session; answer\n400 for a `LogoutTokenError`. Network failures fetching the JWKS surface as `NetworkError`: answer\n5xx so the service retries.",
          "parameters": [
            {
              "name": "token",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "opts",
              "type": "VerifyLogoutTokenOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<LogoutToken>"
        }
      ]
    }
  ]
}
UserInfoResponseinterface
{
  "name": "UserInfoResponse",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 97
  },
  "type": "UserInfoResponse",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "email",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "email_verified",
      "optional": false,
      "type": "boolean",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone_number",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "phone_number_verified",
      "optional": true,
      "type": "boolean | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "sub",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
validateAuthorizationResponsefunction

Validate the front-channel response against the original, single-use transaction. Callers own transaction persistence/expiry and must discard it before exchanging a code.

{
  "name": "validateAuthorizationResponse",
  "kind": "function",
  "description": "Validate the front-channel response against the original, single-use transaction.\nCallers own transaction persistence/expiry and must discard it before exchanging a code.",
  "tags": [],
  "source": {
    "file": "src/oauth-shared.ts",
    "line": 60
  },
  "type": "(callbackUrl: string, expected: { state: string; issuer: string; redirectUri: string; }) => { code: string; }",
  "constructors": [],
  "signatures": [
    {
      "signature": "(callbackUrl: string, expected: { state: string; issuer: string; redirectUri: string; }): { code: string; }",
      "description": "Validate the front-channel response against the original, single-use transaction.\nCallers own transaction persistence/expiry and must discard it before exchanging a code.",
      "parameters": [
        {
          "name": "callbackUrl",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "expected",
          "type": "{ state: string; issuer: string; redirectUri: string; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "{ code: string; }"
    }
  ],
  "properties": []
}
VerifyOptionsinterface
{
  "name": "VerifyOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/types.ts",
    "line": 394
  },
  "type": "VerifyOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "audience",
      "optional": true,
      "type": "string | string[] | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clockSkewSec",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "issuer",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}

@beyondigital/auth-sdk/api

ApiClientErrorclass

The call was refused before it left, or the answer was not the shape the contract promises.

{
  "name": "ApiClientError",
  "kind": "class",
  "description": "The call was refused before it left, or the answer was not the shape the contract promises.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 114
  },
  "type": "typeof ApiClientError",
  "constructors": [
    {
      "signature": "new (code: ApiClientErrorCode, message: string): ApiClientError",
      "description": "",
      "parameters": [
        {
          "name": "code",
          "type": "ApiClientErrorCode",
          "optional": false,
          "description": ""
        },
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ApiClientError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": false,
      "type": "ApiClientErrorCode",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ApiClientErrorCodetype
{
  "name": "ApiClientErrorCode",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 111
  },
  "type": "ApiClientErrorCode",
  "constructors": [],
  "signatures": [],
  "properties": []
}
ApiClientOptionsinterface
{
  "name": "ApiClientOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 76
  },
  "type": "ApiClientOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "allowInsecureHttp",
      "optional": true,
      "type": "boolean | undefined",
      "description": "Allow `http://` to a non-loopback host. Credentials then cross the network in clear text. Default false.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "baseUrl",
      "optional": false,
      "type": "string",
      "description": "The issuer origin, for example `https://auth.example.com`. A path prefix is allowed.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "cookies",
      "optional": true,
      "type": "boolean | undefined",
      "description": "Send the browser's first-party cookies (`fetch` credentials `include`), which is how the console's\n`portalCookie` and the hosted pages' `hostedCookie` authenticate. Off by default.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "credentials",
      "optional": true,
      "type": "ApiCredentials | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "fetch",
      "optional": true,
      "type": "{ (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "headers",
      "optional": true,
      "type": "Record<string, string> | undefined",
      "description": "Headers added to every request (never `Authorization` or `Content-Type`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "timeoutMs",
      "optional": true,
      "type": "number | undefined",
      "description": "Per-request timeout; 0 disables it. Default 30 000.",
      "tags": [],
      "signatures": []
    }
  ]
}
ApiCredentialsinterface

One credential per security scheme named in the contract. The transport picks what an operation accepts.

{
  "name": "ApiCredentials",
  "kind": "interface",
  "description": "One credential per security scheme named in the contract. The transport picks what an operation accepts.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 63
  },
  "type": "ApiCredentials",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "applicationApiKey",
      "optional": true,
      "type": "TokenSource | undefined",
      "description": "An application API key (`applicationApiKey`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "bearerAuth",
      "optional": true,
      "type": "TokenSource | undefined",
      "description": "A user or service access token (`bearerAuth`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientBasic",
      "optional": true,
      "type": "ClientBasicSource | undefined",
      "description": "The registered client id and secret (`clientBasic`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "managementOAuth",
      "optional": true,
      "type": "TokenSource | undefined",
      "description": "An access token for the management MCP resource (`managementOAuth`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "scimToken",
      "optional": true,
      "type": "TokenSource | undefined",
      "description": "A SCIM token (`scimToken`).",
      "tags": [],
      "signatures": []
    }
  ]
}
ApiResponseErrorclass

The service answered with a non-2xx status. Holds the status, the server's error code and the request id.

{
  "name": "ApiResponseError",
  "kind": "class",
  "description": "The service answered with a non-2xx status. Holds the status, the server's error code and the request id.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 124
  },
  "type": "typeof ApiResponseError",
  "constructors": [
    {
      "signature": "new (descriptor: Pick<OperationDescriptor, \"operationId\" | \"method\" | \"path\">, status: number, statusText: string, parts: { code?: string; description?: string; requestId?: string; retryAfterSeconds?: number; body?: unknown; }): ApiResponseError",
      "description": "",
      "parameters": [
        {
          "name": "descriptor",
          "type": "Pick<OperationDescriptor, \"method\" | \"path\" | \"operationId\">",
          "optional": false,
          "description": ""
        },
        {
          "name": "status",
          "type": "number",
          "optional": false,
          "description": ""
        },
        {
          "name": "statusText",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "parts",
          "type": "{ code?: string; description?: string; requestId?: string; retryAfterSeconds?: number; body?: unknown; }",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ApiResponseError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "body",
      "optional": true,
      "type": "unknown",
      "description": "The parsed JSON error body when there was one (at most 64 KiB), otherwise undefined.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "code",
      "optional": true,
      "type": "string | undefined",
      "description": "The `error` (OAuth-style) or `detail` (service envelope) field, when the body had one.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "description",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "operationId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "requestId",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "retryAfterSeconds",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "status",
      "optional": false,
      "type": "number",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "statusText",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "toJSON",
      "optional": false,
      "type": "() => { name: string; operationId: string; status: number; code: string | undefined; description: string | undefined; requestId: string | undefined; }",
      "description": "",
      "tags": [],
      "signatures": [
        {
          "signature": "(): { name: string; operationId: string; status: number; code: string | undefined; description: string | undefined; requestId: string | undefined; }",
          "description": "",
          "parameters": [],
          "returns": "{ name: string; operationId: string; status: number; code: string | undefined; description: string | undefined; requestId: string | undefined; }"
        }
      ]
    }
  ]
}
ApiTransportclass
{
  "name": "ApiTransport",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 357
  },
  "type": "typeof ApiTransport",
  "constructors": [
    {
      "signature": "new (options: ApiClientOptions, operations: Readonly<Record<string, OperationDescriptor>>): ApiTransport",
      "description": "",
      "parameters": [
        {
          "name": "options",
          "type": "ApiClientOptions",
          "optional": false,
          "description": ""
        },
        {
          "name": "operations",
          "type": "Readonly<Record<string, OperationDescriptor>>",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "ApiTransport"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "call",
      "optional": false,
      "type": "(key: string, input?: CallInput, options?: CallOptions) => Promise<unknown>",
      "description": "The function the generated `createAuthApi` calls. `key` is an `OperationKey` of the generated table.",
      "tags": [],
      "signatures": [
        {
          "signature": "(key: string, input?: CallInput, options?: CallOptions): Promise<unknown>",
          "description": "The function the generated `createAuthApi` calls. `key` is an `OperationKey` of the generated table.",
          "parameters": [
            {
              "name": "key",
              "type": "string",
              "optional": false,
              "description": ""
            },
            {
              "name": "input",
              "type": "CallInput | undefined",
              "optional": false,
              "description": ""
            },
            {
              "name": "options",
              "type": "CallOptions",
              "optional": false,
              "description": ""
            }
          ],
          "returns": "Promise<unknown>"
        }
      ]
    }
  ]
}
buildPathfunction
{
  "name": "buildPath",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 226
  },
  "type": "(descriptor: OperationDescriptor, path: Record<string, unknown> | undefined) => string",
  "constructors": [],
  "signatures": [
    {
      "signature": "(descriptor: OperationDescriptor, path: Record<string, unknown> | undefined): string",
      "description": "",
      "parameters": [
        {
          "name": "descriptor",
          "type": "OperationDescriptor",
          "optional": false,
          "description": ""
        },
        {
          "name": "path",
          "type": "Record<string, unknown> | undefined",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "string"
    }
  ],
  "properties": []
}
CallInputinterface

What a caller hands a method. Every group is optional here; each descriptor declares which are required.

{
  "name": "CallInput",
  "kind": "interface",
  "description": "What a caller hands a method. Every group is optional here; each descriptor declares which are required.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 104
  },
  "type": "CallInput",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "body",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "headers",
      "optional": true,
      "type": "Record<string, unknown> | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "path",
      "optional": true,
      "type": "Record<string, unknown> | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "query",
      "optional": true,
      "type": "Record<string, unknown> | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
CallOptionsinterface
{
  "name": "CallOptions",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 94
  },
  "type": "CallOptions",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "credentials",
      "optional": true,
      "type": "ApiCredentials | undefined",
      "description": "Replaces the client-level credential for each scheme given here.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "headers",
      "optional": true,
      "type": "Record<string, string> | undefined",
      "description": "Extra headers for this call (never `Authorization` or `Content-Type`).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "signal",
      "optional": true,
      "type": "AbortSignal | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "timeoutMs",
      "optional": true,
      "type": "number | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ClientBasicCredentialinterface
{
  "name": "ClientBasicCredential",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 56
  },
  "type": "ClientBasicCredential",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "clientId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "clientSecret",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ClientBasicSourcetype
{
  "name": "ClientBasicSource",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 60
  },
  "type": "ClientBasicSource",
  "constructors": [],
  "signatures": [],
  "properties": []
}
createAuthApiClientfunction

Build the generated client. Methods are grouped by the service handler module that answers them.

{
  "name": "createAuthApiClient",
  "kind": "function",
  "description": "Build the generated client. Methods are grouped by the service handler module that answers them.",
  "tags": [],
  "source": {
    "file": "src/api.ts",
    "line": 20
  },
  "type": "(options: ApiClientOptions) => AuthApiClient",
  "constructors": [],
  "signatures": [
    {
      "signature": "(options: ApiClientOptions): AuthApiClient",
      "description": "Build the generated client. Methods are grouped by the service handler module that answers them.",
      "parameters": [
        {
          "name": "options",
          "type": "ApiClientOptions",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "AuthApiClient"
    }
  ],
  "properties": []
}
ExcludedOperationinterface
{
  "name": "ExcludedOperation",
  "kind": "interface",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 40
  },
  "type": "ExcludedOperation",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "handler",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "method",
      "optional": false,
      "type": "HttpMethod",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "operationId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "path",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "reason",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
HttpMethodtype
{
  "name": "HttpMethod",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 16
  },
  "type": "HttpMethod",
  "constructors": [],
  "signatures": [],
  "properties": []
}
isApiResponseErrorfunction
{
  "name": "isApiResponseError",
  "kind": "function",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 154
  },
  "type": "(error: unknown) => error is ApiResponseError",
  "constructors": [],
  "signatures": [
    {
      "signature": "(error: unknown): error is ApiResponseError",
      "description": "",
      "parameters": [
        {
          "name": "error",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "boolean"
    }
  ],
  "properties": []
}
NdjsonPageinterface

An NDJSON export page: the raw text, each line parsed, and the cursor to pass as `after` for the next page.

{
  "name": "NdjsonPage",
  "kind": "interface",
  "description": "An NDJSON export page: the raw text, each line parsed, and the cursor to pass as `after` for the next page.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 49
  },
  "type": "NdjsonPage",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "lines",
      "optional": false,
      "type": "unknown[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "nextCursor",
      "optional": false,
      "type": "number | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "text",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
NetworkErrorclass
{
  "name": "NetworkError",
  "kind": "class",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/errors.ts",
    "line": 44
  },
  "type": "typeof NetworkError",
  "constructors": [
    {
      "signature": "new (message: string, cause?: unknown): NetworkError",
      "description": "",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "optional": false,
          "description": ""
        },
        {
          "name": "cause",
          "type": "unknown",
          "optional": false,
          "description": ""
        }
      ],
      "returns": "NetworkError"
    }
  ],
  "signatures": [],
  "properties": [
    {
      "name": "cause",
      "optional": true,
      "type": "unknown",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "message",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "name",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "stack",
      "optional": true,
      "type": "string | undefined",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
OperationDescriptorinterface

What the generator knows about one operation. The transport reads nothing else about the contract.

{
  "name": "OperationDescriptor",
  "kind": "interface",
  "description": "What the generator knows about one operation. The transport reads nothing else about the contract.",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 21
  },
  "type": "OperationDescriptor",
  "constructors": [],
  "signatures": [],
  "properties": [
    {
      "name": "body",
      "optional": false,
      "type": "{ readonly kind: \"json\" | \"form\"; readonly required: boolean; } | null",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "catchAll",
      "optional": false,
      "type": "readonly string[]",
      "description": "Path parameters that may contain `/` (the route captures the rest of the path).",
      "tags": [],
      "signatures": []
    },
    {
      "name": "handler",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "headers",
      "optional": false,
      "type": "readonly string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "method",
      "optional": false,
      "type": "HttpMethod",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "operationId",
      "optional": false,
      "type": "string",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "path",
      "optional": false,
      "type": "string",
      "description": "Path template; `{name}` marks a path parameter.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "pathParams",
      "optional": false,
      "type": "readonly string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "query",
      "optional": false,
      "type": "readonly string[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "response",
      "optional": false,
      "type": "ResponseKind",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "security",
      "optional": false,
      "type": "readonly (readonly string[])[]",
      "description": "Alternatives in the contract's order; an empty alternative means the call may be anonymous.",
      "tags": [],
      "signatures": []
    },
    {
      "name": "successStatuses",
      "optional": false,
      "type": "readonly number[]",
      "description": "",
      "tags": [],
      "signatures": []
    },
    {
      "name": "surface",
      "optional": false,
      "type": "Surface",
      "description": "",
      "tags": [],
      "signatures": []
    }
  ]
}
ResponseKindtype
{
  "name": "ResponseKind",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 18
  },
  "type": "ResponseKind",
  "constructors": [],
  "signatures": [],
  "properties": []
}
Surfacetype
{
  "name": "Surface",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 17
  },
  "type": "Surface",
  "constructors": [],
  "signatures": [],
  "properties": []
}
TokenSourcetype
{
  "name": "TokenSource",
  "kind": "type",
  "description": "",
  "tags": [],
  "source": {
    "file": "src/api-transport.ts",
    "line": 55
  },
  "type": "TokenSource",
  "constructors": [],
  "signatures": [],
  "properties": []
}