Python SDK
Versioned contracts generated from actual source.
Generated with Python inspect and Pydantic validation/serialization schemas from public SDK exports. Method signatures include their required arguments. SDK version 0.1.0. Runnable examples are validated separately with synthetic local services.
beyondigital_auth
AsyncAuthClientclass
Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR. Also: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs, `private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).
{
"name": "AsyncAuthClient",
"description": "Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR.\n\nAlso: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs,\n`private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).",
"kind": "class",
"signature": "(issuer_url: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, redirect_uri: 'str | None' = None, scopes: 'list[str] | None' = None, http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0, token_endpoint_auth_method: \"Literal['none', 'client_secret_basic', 'client_secret_post', 'private_key_jwt'] | None\" = None, client_assertion_key: 'ClientAssertionKey | None' = None, dpop: 'DpopKey | None' = None) -> 'None'",
"members": [
{
"name": "client_credentials",
"kind": "async method",
"signature": "(self, resource: 'str | list[str]', scope: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "create_authorization_url",
"kind": "method",
"signature": "(self, code_challenge: 'str', code_challenge_method: 'str' = 'S256', scope: 'str | None' = None, state: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, client_id: 'str | None' = None) -> 'str'",
"description": ""
},
{
"name": "create_authorization_url_from_request_uri",
"kind": "method",
"signature": "(self, request_uri: 'str') -> 'str'",
"description": "The authorize URL for a pushed request: `client_id` and `request_uri` only."
},
{
"name": "create_end_session_url",
"kind": "method",
"signature": "(self, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"description": "The URL to send the person's browser to in order to end their session.\n\nUses the discovered `end_session_endpoint` when it is on the issuer's origin,\n`<issuer>/oauth/end_session` otherwise. The service redirects to `post_logout_redirect_uri`\nonly for an `id_token_hint` that names a client for which that URI is registered."
},
{
"name": "device_login",
"kind": "async method",
"signature": "(self, on_user_code: 'Callable[[DeviceAuthorization], Awaitable[None] | None]', scope: 'str | None' = None, resource: 'str | list[str] | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "`start_device_authorization`, hand the codes to `on_user_code`, then\n`poll_device_token`."
},
{
"name": "discover",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "discover_oauth",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "dpop_headers",
"kind": "method",
"signature": "(self, access_token: 'str', method: 'str', url: 'str') -> 'dict[str, str]'",
"description": "The `Authorization: DPoP <token>` and `DPoP: <proof>` headers for a request to any\nresource server, with the proof bound to the token (`ath`), the method and the URL\n(query and fragment excluded). Needs the `dpop` key. Call once per request: a proof is\nsingle use."
},
{
"name": "exchange_code",
"kind": "async method",
"signature": "(self, code: 'str', code_verifier: 'str', redirect_uri: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "exchange_token",
"kind": "async method",
"signature": "(self, subject_token: 'str', subject_token_type: 'str | None' = None, actor_token: 'str | None' = None, actor_token_type: 'str | None' = None, requested_token_type: 'str | None' = None, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": "Exchange an access token for a delegated one (the service's delegation grants decide\nwhether it may).\n\n`subject_token` is the delegator's access token; `actor_token` the acting party's. The\ntoken types default to the only one the service supports. Never carries a DPoP proof: the\nservice accepts one for the code and refresh grants only."
},
{
"name": "health",
"kind": "async method",
"signature": "(self) -> 'dict'",
"description": ""
},
{
"name": "introspect",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'IntrospectionResponse'",
"description": ""
},
{
"name": "jwks",
"kind": "async method",
"signature": "(self) -> 'JwksResponse'",
"description": ""
},
{
"name": "poll_device_token",
"kind": "async method",
"signature": "(self, device: 'DeviceAuthorization', client_id: 'str | None' = None, client_secret: 'str | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "Poll the token endpoint until the person approves.\n\nWaits the interval before each poll, adds five seconds after `slow_down`, and stops with\nthe service's `OAuthError` for `access_denied`, `expired_token` or anything else (and with\n`expired_token` once the device code's own lifetime would pass). Set the `cancel` event to\nstop (`DeviceFlowCancelled`). A network failure is raised as `NetworkError`, not retried;\ncall again with the same authorization to resume."
},
{
"name": "push_authorization_request",
"kind": "async method",
"signature": "(self, code_challenge: 'str', state: 'str | None' = None, scope: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, extra: 'Mapping[str, str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'PushedAuthorization'",
"description": "Send the authorize parameters to the service directly and get a one-use `request_uri`\nback, so the browser carries nothing the person could read or edit.\n\nAuthenticates like the token endpoint. Then redirect to\n`create_authorization_url_from_request_uri(result.request_uri)`."
},
{
"name": "refresh",
"kind": "async method",
"signature": "(self, refresh_token: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "register",
"kind": "async method",
"signature": "(self, redirect_uris: 'list[str]', client_name: 'str | None' = None, scope: 'str | None' = None, grant_types: 'list[str] | None' = None, response_types: 'list[str] | None' = None, token_endpoint_auth_method: 'str' = 'none', client_uri: 'str | None' = None, logo_uri: 'str | None' = None, application_type: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "revoke",
"kind": "async method",
"signature": "(self, token: 'str') -> 'None'",
"description": ""
},
{
"name": "start_device_authorization",
"kind": "async method",
"signature": "(self, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'DeviceAuthorization'",
"description": "Ask for a device code and a user code.\n\nShow `user_code` and `verification_uri` (or `verification_uri_complete`, for a QR code) to\nthe person, then call `poll_device_token`. The client must be registered for the\ndevice_code grant; a confidential client authenticates with its secret (`private_key_jwt`\nis not accepted at this endpoint by the service)."
},
{
"name": "userinfo",
"kind": "async method",
"signature": "(self, access_token: 'str', token_type: \"Literal['Bearer', 'DPoP']\" = 'Bearer') -> 'UserInfoResponse'",
"description": "`token_type=\"DPoP\"` for a token issued with a DPoP proof: sent under the DPoP scheme\nwith a proof bound to it."
}
],
"definedIn": "beyondigital_auth.client.AsyncAuthClient",
"source": {
"file": "src/beyondigital_auth/client.py",
"line": 93
}
}AsyncMultiIssuerVerifierclass
Verify RS256 access tokens from an explicit allow-list of issuers. `verify()` is the production surface: RFC 9068 `at+jwt` typ by default, the issuer allow-list + audience pins, and one bounded JWKS refresh on a kid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching auth_service's `decode_with_policy` semantics exactly.
{
"name": "AsyncMultiIssuerVerifier",
"description": "Verify RS256 access tokens from an explicit allow-list of issuers.\n\n`verify()` is the production surface: RFC 9068 `at+jwt` typ by default,\nthe issuer allow-list + audience pins, and one bounded JWKS refresh on a\nkid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching\nauth_service's `decode_with_policy` semantics exactly.",
"kind": "class",
"signature": "(issuers: 'list[str | IssuerConfig]', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, clock_skew_sec: 'int' = 0, http_client: 'httpx.AsyncClient | None' = None, require_at_jwt: 'bool' = True, min_jwks_fetch_interval_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "issuers",
"kind": "property",
"signature": "(self) -> 'list[str]'",
"description": "The normalised issuer allow-list, in configuration order."
},
{
"name": "set_issuer_jwks_uri",
"kind": "method",
"signature": "(self, issuer_url: 'str', uri: 'str') -> 'None'",
"description": "Set/override one issuer's JWKS URI after discovery. The issuer must\nbe allow-listed; its cache is dropped."
},
{
"name": "verify",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str | list[str] | None' = None, issuer: 'str | None' = None) -> 'CurrentUser'",
"description": "Verify an access token and return the CurrentUser (with the\nverified `issuer`). `issuer` may only narrow to one allow-listed issuer."
},
{
"name": "verify_claims",
"kind": "async method",
"signature": "(self, token: 'str', policy: 'ValidationPolicy') -> 'dict'",
"description": "Verify `token` against `policy`: JOSE typ (when the purpose\ncarries `at+jwt`), issuer allow-list (before any fetch), kid-pinned\nsignature with the key's own algorithm + expiry, then the claim\ncontract (type, required claims, iss/aud allow-lists)."
},
{
"name": "verify_logout_token",
"kind": "async method",
"signature": "(self, token: 'str', client_id: 'str | list[str]', now: 'float | None' = None, max_age_seconds: 'float | None' = None, consume_jti: 'ConsumeJti | None' = None) -> 'LogoutToken'",
"description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs\nto a client'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\npass as one); `iss` is on the issuer allow-list (before any JWKS request); the signature\nverifies under the key the issuer publishes for the token's `kid`, with the algorithm\nthe key dictates, and the token has not expired; `aud` names this client; `iat`, `exp`\nand `jti` are present and `iat` is recent; `events` has the back-channel logout member\nas an object; there is no `nonce`; and `sub`, `sid` or both are present. Anything else\nraises `LogoutTokenError` with a `reason` and a fixed message.\n\n`consume_jti(jti, expires_at)` is optional replay protection, called once after every\nother check passed; return False when that `jti` was seen before. The service re-sends a\ndelivery with the same `jti` until it gets a 2xx, so record the `jti` only once you have\nended the session, or a retry after your own failure will be refused as a replay.\n\nAnswer 200 (or 204) to the service only after this returns and you have ended the\nsession; answer 400 for a `LogoutTokenError`. A failure fetching the JWKS surfaces as\n`NetworkError`: answer 5xx so the service retries."
}
],
"definedIn": "beyondigital_auth.jwt.AsyncMultiIssuerVerifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 201
}
}AsyncOtpClientclass
{
"name": "AsyncOtpClient",
"description": "",
"kind": "class",
"signature": "(issuer_url: 'str', http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0, api_key: 'str | None' = None) -> 'None'",
"members": [
{
"name": "cancel_server_otp_session",
"kind": "async method",
"signature": "(self, app: 'str', *, client_id: 'str', environment_id: 'str', nonce: 'str') -> 'OtpSessionCancellation'",
"description": "Use the original otp:verify API key; persist/retry uncertain BFF cancellations.\n\nNo automatic retry, contact/channel transfer, or credential recovery occurs."
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "password_login",
"kind": "async method",
"signature": "(self, email: 'str', password: 'str', app: 'str' = 'admin', client_id: 'str' = 'admin-panel') -> 'LoginResponse'",
"description": ""
},
{
"name": "refresh_token",
"kind": "async method",
"signature": "(self, refresh_token: 'str', client_id: 'str' = 'mobile-app', *, resource: 'str | list[str] | None' = None) -> 'dict'",
"description": "Rotate through the strict OAuth endpoint, preserving the resource pin."
},
{
"name": "send_email_verify_otp",
"kind": "async method",
"signature": "(self, email: 'str', client_id: 'str', access_token: 'str', app: 'str' = 'shared_auth') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_login_otp",
"kind": "async method",
"signature": "(self, phone: 'str', client_id: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_register_otp",
"kind": "async method",
"signature": "(self, phone: 'str', full_name: 'str', client_id: 'str', app: 'str' = 'shared_auth') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_server_otp",
"kind": "async method",
"signature": "(self, recipient: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms', *, mode: \"Literal['verification_only', 'session']\" = 'verification_only', client_id: 'str | None' = None, environment_id: 'str | None' = None, nonce: 'str | None' = None) -> 'OtpSendResponse'",
"description": ""
},
{
"name": "verify_email_verify_otp",
"kind": "async method",
"signature": "(self, email: 'str', otp: 'str', client_id: 'str', access_token: 'str', app: 'str' = 'shared_auth') -> 'dict'",
"description": ""
},
{
"name": "verify_login_otp",
"kind": "async method",
"signature": "(self, phone: 'str', otp: 'str', client_id: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms') -> 'LoginResponse'",
"description": ""
},
{
"name": "verify_register_otp",
"kind": "async method",
"signature": "(self, phone: 'str', otp: 'str', full_name: 'str', client_id: 'str', app: 'str' = 'shared_auth') -> 'LoginResponse'",
"description": ""
},
{
"name": "verify_server_otp",
"kind": "async method",
"signature": "(self, recipient: 'str', otp: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms', *, mode: \"Literal['verification_only', 'session']\" = 'verification_only', client_id: 'str | None' = None, environment_id: 'str | None' = None, nonce: 'str | None' = None) -> 'OtpVerificationResponse'",
"description": ""
}
],
"definedIn": "beyondigital_auth.otp.AsyncOtpClient",
"source": {
"file": "src/beyondigital_auth/otp.py",
"line": 33
}
}AsyncSaasClientclass
{
"name": "AsyncSaasClient",
"description": "",
"kind": "class",
"signature": "(issuer_url: 'str', http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "accept_team_invitation",
"kind": "async method",
"signature": "(self, access_token: 'str', token: 'str') -> 'dict'",
"description": ""
},
{
"name": "change_member_role",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', user_id: 'str', role: 'str', *, proof_id: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "create_account",
"kind": "async method",
"signature": "(self, access_token: 'str', name: 'str', slug: 'str', billing_email: 'str | None' = None) -> 'Account'",
"description": ""
},
{
"name": "create_application",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', name: 'str', slug: 'str') -> 'Application'",
"description": ""
},
{
"name": "create_checkout",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', token_pack_price_id: 'str', idempotency_key: 'str', *, proof_id: 'str | None' = None) -> 'CheckoutResult'",
"description": ""
},
{
"name": "create_public_client",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str', name: 'str', redirect_uris: 'list[str]', allowed_scopes: 'list[str] | None' = None, *, client_id: 'str', issuer: 'str', application_type: 'str', allowed_resources: 'list[str] | None' = None, directory_id: 'str | None' = None, otp_backend_only: 'bool' = False) -> 'PublicClient'",
"description": ""
},
{
"name": "create_team_invitation",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', email: 'str', role: 'str', expires_in_hours: 'int | None' = None, *, proof_id: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "get_catalog",
"kind": "async method",
"signature": "(self, market: 'str', currency: 'str | None' = None, access_token: 'str | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "get_overview",
"kind": "async method",
"signature": "(self, access_token: 'str') -> 'dict'",
"description": ""
},
{
"name": "get_wallet",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'dict'",
"description": ""
},
{
"name": "list_accounts",
"kind": "async method",
"signature": "(self, access_token: 'str') -> 'list[Account]'",
"description": ""
},
{
"name": "list_applications",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[Application]'",
"description": ""
},
{
"name": "list_public_clients",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str') -> 'list[PublicClient]'",
"description": ""
},
{
"name": "list_purchases",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', limit: 'int | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "list_resources",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', after: 'str | None' = None) -> 'list[ResourceRegistration]'",
"description": "One page of at most 100 records; after is the last raw registration UUID."
},
{
"name": "list_team_invitations",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[dict]'",
"description": ""
},
{
"name": "list_team_members",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[dict]'",
"description": ""
},
{
"name": "list_usage",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', limit: 'int | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "propose_resource",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', proposal: 'ResourceProposal') -> 'ResourceRegistration'",
"description": "Submit for operator review; never approves or proves domain ownership."
},
{
"name": "reconcile_checkout_return",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', purchase_id: 'str') -> 'ReconcileResult'",
"description": ""
},
{
"name": "remove_team_member",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', user_id: 'str', *, proof_id: 'str | None' = None) -> 'None'",
"description": ""
},
{
"name": "update_application",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str', name: 'str | None' = None, slug: 'str | None' = None) -> 'Application'",
"description": ""
}
],
"definedIn": "beyondigital_auth.saas.AsyncSaasClient",
"source": {
"file": "src/beyondigital_auth/saas.py",
"line": 32
}
}AsyncTokenVerifierclass
Single-issuer verifier: the original API, as a one-issuer `AsyncMultiIssuerVerifier`.
{
"name": "AsyncTokenVerifier",
"description": "Single-issuer verifier: the original API, as a one-issuer\n`AsyncMultiIssuerVerifier`.",
"kind": "class",
"signature": "(issuer_url: 'str', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, clock_skew_sec: 'int' = 0, http_client: 'httpx.AsyncClient | None' = None, require_at_jwt: 'bool' = True, min_jwks_fetch_interval_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "issuers",
"kind": "property",
"signature": "(self) -> 'list[str]'",
"description": "The normalised issuer allow-list, in configuration order."
},
{
"name": "set_issuer_jwks_uri",
"kind": "method",
"signature": "(self, issuer_url: 'str', uri: 'str') -> 'None'",
"description": "Set/override one issuer's JWKS URI after discovery. The issuer must\nbe allow-listed; its cache is dropped."
},
{
"name": "set_jwks_uri",
"kind": "method",
"signature": "(self, uri: 'str') -> 'None'",
"description": ""
},
{
"name": "verify",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str | list[str] | None' = None, issuer: 'str | None' = None) -> 'CurrentUser'",
"description": "Verify an access token and return the CurrentUser (with the\nverified `issuer`). `issuer` may only narrow to one allow-listed issuer."
},
{
"name": "verify_claims",
"kind": "async method",
"signature": "(self, token: 'str', policy: 'ValidationPolicy') -> 'dict'",
"description": "Verify `token` against `policy`: JOSE typ (when the purpose\ncarries `at+jwt`), issuer allow-list (before any fetch), kid-pinned\nsignature with the key's own algorithm + expiry, then the claim\ncontract (type, required claims, iss/aud allow-lists)."
},
{
"name": "verify_logout_token",
"kind": "async method",
"signature": "(self, token: 'str', client_id: 'str | list[str]', now: 'float | None' = None, max_age_seconds: 'float | None' = None, consume_jti: 'ConsumeJti | None' = None) -> 'LogoutToken'",
"description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs\nto a client'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\npass as one); `iss` is on the issuer allow-list (before any JWKS request); the signature\nverifies under the key the issuer publishes for the token's `kid`, with the algorithm\nthe key dictates, and the token has not expired; `aud` names this client; `iat`, `exp`\nand `jti` are present and `iat` is recent; `events` has the back-channel logout member\nas an object; there is no `nonce`; and `sub`, `sid` or both are present. Anything else\nraises `LogoutTokenError` with a `reason` and a fixed message.\n\n`consume_jti(jti, expires_at)` is optional replay protection, called once after every\nother check passed; return False when that `jti` was seen before. The service re-sends a\ndelivery with the same `jti` until it gets a 2xx, so record the `jti` only once you have\nended the session, or a retry after your own failure will be refused as a replay.\n\nAnswer 200 (or 204) to the service only after this returns and you have ended the\nsession; answer 400 for a `LogoutTokenError`. A failure fetching the JWKS surfaces as\n`NetworkError`: answer 5xx so the service retries."
}
],
"definedIn": "beyondigital_auth.jwt.AsyncTokenVerifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 553
}
}CLIENT_ASSERTION_TYPEtype
{
"name": "CLIENT_ASSERTION_TYPE",
"description": "",
"kind": "type",
"type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
}ClientAssertionKeyclass
A private key registered for a client. The private half cannot be read back from this object.
{
"name": "ClientAssertionKey",
"description": "A private key registered for a client. The private half cannot be read back from this\nobject.",
"kind": "class",
"signature": "(alg: 'str', kid: 'str | None', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, str | None]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.client_assertion.ClientAssertionKey",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 37
}
}CurrentUserclass
Verified identity from an access token (mirrors shared/auth/schemas.py).
{
"name": "CurrentUser",
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"kind": "class",
"signature": "(*, id: str, email: str = '', scopes: list[str] = <factory>, is_active: bool = True, firm_id: str | None = None, auth_user_id: str | None = None, session_id: str | None = None, app: str | None = None, token_version: int = 0, permissions_version: int = 0, is_system_admin: bool = False, identity_class: str | None = None, issuer: str | None = None) -> None",
"members": [
{
"name": "central_identity_id",
"kind": "property",
"signature": "(self) -> 'str'",
"description": ""
},
{
"name": "has_scope",
"kind": "method",
"signature": "(self, scope: 'str') -> 'bool'",
"description": ""
},
{
"name": "is_admin",
"kind": "method",
"signature": "(self) -> 'bool'",
"description": ""
}
],
"jsonSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"serializationSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CurrentUser",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 115
}
}DeviceAuthorizationclass
The answer to a device authorization request: show `user_code` and `verification_uri` to the person.
{
"name": "DeviceAuthorization",
"description": "The answer to a device authorization request: show `user_code` and `verification_uri` to the\nperson.",
"kind": "class",
"signature": "(device_code: 'str', user_code: 'str', verification_uri: 'str', expires_in: 'float', verification_uri_complete: 'str | None' = None, interval: 'int | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.DeviceAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 34
}
}DeviceFlowCancelledclass
The caller set the `cancel` event: the device flow stopped without a token.
{
"name": "DeviceFlowCancelled",
"description": "The caller set the `cancel` event: the device flow stopped without a token.",
"kind": "class",
"signature": "() -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.flows.DeviceFlowCancelled",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 53
}
}DpopKeyclass
A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.
{
"name": "DpopKey",
"description": "A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read\nback.",
"kind": "class",
"signature": "(alg: 'str', public_jwk: 'dict[str, str]', thumbprint: 'str', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.dpop.DpopKey",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 54
}
}DpopSessionclass
Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.
{
"name": "DpopSession",
"description": "Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry\non a nonce challenge.",
"kind": "class",
"signature": "(key: 'DpopKey') -> 'None'",
"members": [
{
"name": "fetch",
"kind": "async method",
"signature": "(self, fetcher: 'Fetcher', method: 'str', url: 'str', request: 'RequestSource' = None, access_token: 'str | None' = None) -> 'httpx.Response'",
"description": "`fetcher(method, url, headers, content)` is called with the proof added.\n\nA `DPoP` header the caller set is replaced. `access_token` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`request` 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\ncredential (a `private_key_jwt` assertion) can mint a new one instead of replaying the\nfirst."
},
{
"name": "headers",
"kind": "method",
"signature": "(self, method: 'str', url: 'str', access_token: 'str | None' = None) -> 'dict[str, str]'",
"description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a\ntoken goes with it.\n\nCall once per request: a proof is single use."
}
],
"definedIn": "beyondigital_auth.dpop.DpopSession",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 219
}
}IntrospectionResponseclass
{
"name": "IntrospectionResponse",
"description": "",
"kind": "class",
"signature": "(*, active: bool, iss: str | None = None, aud: typing.Any | None = None, scope: str | None = None, scopes: list[str] | None = None, client_id: str | None = None, sub: str | None = None, exp: int | None = None, central_user_id: str | None = None, is_system_admin: bool | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.IntrospectionResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 60
}
}IssuerConfigclass
One allow-listed issuer. `jwks_uri` overrides the default `<issuer>/.well-known/jwks.json` (set it from discovery).
{
"name": "IssuerConfig",
"description": "One allow-listed issuer. `jwks_uri` overrides the default\n`<issuer>/.well-known/jwks.json` (set it from discovery).",
"kind": "class",
"signature": "(issuer_url: 'str', jwks_uri: 'str | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.jwt.IssuerConfig",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 106
}
}JwksResponseclass
{
"name": "JwksResponse",
"description": "",
"kind": "class",
"signature": "(*, keys: list[beyondigital_auth.types.Jwk]) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.JwksResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 43
}
}JwtErrorclass
JWT validation failure.
{
"name": "JwtError",
"description": "JWT validation failure.",
"kind": "class",
"signature": "(message: 'str', code: 'str' = 'invalid') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.JwtError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 23
}
}LoginResponseclass
{
"name": "LoginResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.LoginResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 97
}
}LogoutTokenclass
What a verified logout token tells the relying party.
{
"name": "LogoutToken",
"description": "What a verified logout token tells the relying party.",
"kind": "class",
"signature": "(issuer: 'str', jti: 'str', issued_at: 'float', expires_at: 'float', subject: 'str | None' = None, session_id: 'str | None' = None, claims: 'dict[str, Any]' = <factory>) -> None",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutToken",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 84
}
}LogoutTokenErrorclass
A back-channel logout token that must not be acted on. `reason` says which rule it broke.
{
"name": "LogoutTokenError",
"description": "A back-channel logout token that must not be acted on. `reason` says which rule it broke.",
"kind": "class",
"signature": "(reason: 'LogoutFailure') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutTokenError",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 76
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}OidcMetadataclass
{
"name": "OidcMetadata",
"description": "",
"kind": "class",
"signature": "(*, issuer: str, authorization_endpoint: str, token_endpoint: str, userinfo_endpoint: str, registration_endpoint: str, jwks_uri: str, revocation_endpoint: str, introspection_endpoint: str, scopes_supported: list[str] = <factory>, response_types_supported: list[str] = <factory>, grant_types_supported: list[str] = <factory>, end_session_endpoint: str | None = None, device_authorization_endpoint: str | None = None, pushed_authorization_request_endpoint: str | None = None, require_pushed_authorization_requests: bool | None = None, dpop_signing_alg_values_supported: list[str] | None = None, token_endpoint_auth_signing_alg_values_supported: list[str] | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"serializationSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OidcMetadata",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 10
}
}OtpIdentityResponseclass
{
"name": "OtpIdentityResponse",
"description": "",
"kind": "class",
"signature": "(*, verified: bool, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpIdentityResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 101
}
}OtpSessionCancellationclass
Acknowledgement only; no recovered credentials or session tokens.
{
"name": "OtpSessionCancellation",
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"kind": "class",
"signature": "(*, status: Literal['cancelled']) -> None",
"members": [],
"jsonSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"serializationSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpSessionCancellation",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 109
}
}OtpVerificationResponsetype
{
"name": "OtpVerificationResponse",
"description": "",
"kind": "type",
"type": "beyondigital_auth.types.OtpIdentityResponse | beyondigital_auth.types.LoginResponse"
}PushedAuthorizationclass
PushedAuthorization(request_uri: 'str', expires_in: 'float')
{
"name": "PushedAuthorization",
"description": "PushedAuthorization(request_uri: 'str', expires_in: 'float')",
"kind": "class",
"signature": "(request_uri: 'str', expires_in: 'float') -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.PushedAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 177
}
}ResourceProposalclass
An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.
{
"name": "ResourceProposal",
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"kind": "class",
"signature": "(*, directory_id: str, resource_uri: str, proposed_scopes: list[str]) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"serializationSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceProposal",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 156
}
}ResourceRegistrationclass
{
"name": "ResourceRegistration",
"description": "",
"kind": "class",
"signature": "(*, id: str, account_id: str, environment_id: str, directory_id: str, resource_uri: str, proposed_scopes: list[str], approved_scopes: list[str], status: Literal['pending', 'approved', 'suspended', 'rejected'], public_clients: bool, proposed_by_user_id: str, reviewed_by_user_id: str | None, reviewed_at: str | None, created_at: str, updated_at: str) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceRegistration",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 165
}
}ResourceStatustype
{
"name": "ResourceStatus",
"description": "",
"kind": "type",
"type": "typing.Literal['pending', 'approved', 'suspended', 'rejected']"
}TOKEN_TYPE_ACCESS_TOKENtype
{
"name": "TOKEN_TYPE_ACCESS_TOKEN",
"description": "",
"kind": "type",
"type": "urn:ietf:params:oauth:token-type:access_token"
}TokenPurposeclass
{
"name": "TokenPurpose",
"description": "",
"kind": "class",
"signature": "(*values)",
"members": [],
"definedIn": "beyondigital_auth.policy.TokenPurpose",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 27
}
}TokenResponseclass
{
"name": "TokenResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.TokenResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 47
}
}UserInfoResponseclass
{
"name": "UserInfoResponse",
"description": "",
"kind": "class",
"signature": "(*, sub: str, email: str, email_verified: bool, name: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.UserInfoResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 73
}
}ValidationPolicyclass
ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)
{
"name": "ValidationPolicy",
"description": "ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)",
"kind": "class",
"signature": "(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True) -> None",
"members": [
{
"name": "access",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "allow_legacy_typ",
"kind": "method",
"signature": "(self) -> 'ValidationPolicy'",
"description": "Compat window for pre-WP-03b access tokens with no `typ` header."
},
{
"name": "id_token",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "internal_assertion",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "refresh",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_expected_audiences",
"kind": "method",
"signature": "(self, audiences: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_trusted_issuers",
"kind": "method",
"signature": "(self, issuers: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
}
],
"definedIn": "beyondigital_auth.policy.ValidationPolicy",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 37
}
}assert_dpop_supportedfunction
The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.
{
"name": "assert_dpop_supported",
"description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a\nproof is sent.",
"kind": "function",
"signature": "(metadata: 'object', key: 'DpopKey') -> 'None'",
"definedIn": "beyondigital_auth.dpop.assert_dpop_supported",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 183
}
}build_end_session_urlfunction
The URL to send the person's browser to in order to end their session at the service. `end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to `<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service redirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.
{
"name": "build_end_session_url",
"description": "The URL to send the person's browser to in order to end their session at the service.\n\n`end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to\n`<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service\nredirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.",
"kind": "function",
"signature": "(issuer_url: 'str', end_session_endpoint: 'str | None' = None, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.logout.build_end_session_url",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 181
}
}create_client_assertionfunction
A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`). `lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a real call leaves them out, so every assertion gets the current time and a fresh random `jti`.
{
"name": "create_client_assertion",
"description": "A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`).\n\n`lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a\nreal call leaves them out, so every assertion gets the current time and a fresh random `jti`.",
"kind": "function",
"signature": "(client_id: 'str', audience: 'str', key: 'ClientAssertionKey', lifetime_seconds: 'int | None' = None, now: 'int | None' = None, jti: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.client_assertion.create_client_assertion",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 89
}
}create_dpop_prooffunction
A DPoP proof JWT for one request. `method` is upper-cased; `url`'s query and fragment are not part of the proof; `access_token` adds `ath` (a request made with that token); `nonce` is one the server gave. `now` (unix seconds) and `jti` are for tests: a real call leaves them out so every proof is fresh and has its own `jti`.
{
"name": "create_dpop_proof",
"description": "A DPoP proof JWT for one request.\n\n`method` is upper-cased; `url`'s query and fragment are not part of the proof; `access_token`\nadds `ath` (a request made with that token); `nonce` is one the server gave. `now` (unix\nseconds) and `jti` are for tests: a real call leaves them out so every proof is fresh and has\nits own `jti`.",
"kind": "function",
"signature": "(key: 'DpopKey', method: 'str', url: 'str', access_token: 'str | None' = None, nonce: 'str | None' = None, now: 'int | None' = None, jti: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.dpop.create_dpop_proof",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 145
}
}create_multi_issuer_verifierfunction
{
"name": "create_multi_issuer_verifier",
"description": "",
"kind": "function",
"signature": "(issuers: 'list[str | IssuerConfig]', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, http_client: 'httpx.AsyncClient | None' = None) -> 'AsyncMultiIssuerVerifier'",
"definedIn": "beyondigital_auth.jwt.create_multi_issuer_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 593
}
}create_verifierfunction
{
"name": "create_verifier",
"description": "",
"kind": "function",
"signature": "(issuer_url: 'str', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, http_client: 'httpx.AsyncClient | None' = None) -> 'AsyncTokenVerifier'",
"definedIn": "beyondigital_auth.jwt.create_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 584
}
}generate_code_challengefunction
{
"name": "generate_code_challenge",
"description": "",
"kind": "function",
"signature": "(verifier: 'str') -> 'str'",
"definedIn": "beyondigital_auth.jwt.generate_code_challenge",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 58
}
}generate_code_verifierfunction
{
"name": "generate_code_verifier",
"description": "",
"kind": "function",
"signature": "() -> 'str'",
"definedIn": "beyondigital_auth.jwt.generate_code_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 53
}
}generate_dpop_keyfunction
A new key pair: ES256 (P-256, the default), PS256 or RS256 (RSA 2048).
{
"name": "generate_dpop_key",
"description": "A new key pair: ES256 (P-256, the default), PS256 or RS256 (RSA 2048).",
"kind": "function",
"signature": "(alg: 'DpopAlgorithm' = 'ES256') -> 'DpopKey'",
"definedIn": "beyondigital_auth.dpop.generate_dpop_key",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 120
}
}import_client_assertion_keyfunction
Load a private key for `private_key_jwt`: a private JWK, a PKCS#8 PEM or a `cryptography` key object. Only RS256 (RSA, 2048 bits or more), PS256 (the same) and ES256 (P-256) are accepted.
{
"name": "import_client_assertion_key",
"description": "Load a private key for `private_key_jwt`: a private JWK, a PKCS#8 PEM or a `cryptography` key\nobject.\n\nOnly RS256 (RSA, 2048 bits or more), PS256 (the same) and ES256 (P-256) are accepted.",
"kind": "function",
"signature": "(alg: 'str', private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None, kid: 'str | None' = None) -> 'ClientAssertionKey'",
"definedIn": "beyondigital_auth.client_assertion.import_client_assertion_key",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 68
}
}import_dpop_keyfunction
Use a key you already hold (a private JWK, a PKCS#8 PEM or a `cryptography` key object).
{
"name": "import_dpop_key",
"description": "Use a key you already hold (a private JWK, a PKCS#8 PEM or a `cryptography` key object).",
"kind": "function",
"signature": "(alg: 'DpopAlgorithm', private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None) -> 'DpopKey'",
"definedIn": "beyondigital_auth.dpop.import_dpop_key",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 131
}
}is_at_jwt_typfunction
RFC 9068 §2.1: `typ` compares case-insensitively as a media type; `application/at+jwt` is the explicit-registration equivalent.
{
"name": "is_at_jwt_typ",
"description": "RFC 9068 §2.1: `typ` compares case-insensitively as a media type;\n`application/at+jwt` is the explicit-registration equivalent.",
"kind": "function",
"signature": "(typ: 'str | None') -> 'bool'",
"definedIn": "beyondigital_auth.policy.is_at_jwt_typ",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 77
}
}validate_claimsfunction
Bind a verified claim set to its purpose — byte-for-byte port of the service's `validate_claims`.
{
"name": "validate_claims",
"description": "Bind a verified claim set to its purpose — byte-for-byte port of the\nservice's `validate_claims`.",
"kind": "function",
"signature": "(claims: 'dict', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_claims",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 115
}
}validate_typ_headerfunction
{
"name": "validate_typ_header",
"description": "",
"kind": "function",
"signature": "(typ: 'str | None', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_typ_header",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 86
}
}beyondigital_auth.api
ApiClientErrorclass
Raised before a request is sent (bad input, missing credential, bad base URL) or when a success body is not the shape the contract promises. ``code`` is one of ``CLIENT_ERROR_CODES``. The message never carries a token.
{
"name": "ApiClientError",
"description": "Raised before a request is sent (bad input, missing credential, bad base URL) or when a\nsuccess body is not the shape the contract promises. ``code`` is one of\n``CLIENT_ERROR_CODES``. The message never carries a token.",
"kind": "class",
"signature": "(code: 'str', message: 'str') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.api_errors.ApiClientError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 16
}
}ApiCredentialsclass
One credential per security scheme named in the contract. The transport picks what an operation accepts.
{
"name": "ApiCredentials",
"description": "One credential per security scheme named in the contract. The transport picks what an\noperation accepts.",
"kind": "class",
"signature": "(bearer_auth: 'TokenSource | None' = None, management_oauth: 'TokenSource | None' = None, application_api_key: 'TokenSource | None' = None, scim_token: 'TokenSource | None' = None, client_basic: 'ClientBasicSource | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ApiCredentials",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 121
}
}ApiResponseErrorclass
The service answered with a non-2xx status. It holds the status, the server's error code and the request id, never the request, a header or a credential.
{
"name": "ApiResponseError",
"description": "The service answered with a non-2xx status. It holds the status, the server's error code and\nthe request id, never the request, a header or a credential.",
"kind": "class",
"signature": "(*, operation_id: 'str', method: 'str', path: 'str', status: 'int', reason: 'str' = '', code: 'str | None' = None, description: 'str | None' = None, request_id: 'str | None' = None, retry_after_seconds: 'int | None' = None, body: 'Any' = None) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.api_errors.ApiResponseError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 27
}
}AsyncAuthApiClientclass
The generated client over an ``httpx.AsyncClient``. Use it as an async context manager, or call ``aclose``.
{
"name": "AsyncAuthApiClient",
"description": "The generated client over an ``httpx.AsyncClient``. Use it as an async context manager, or\ncall ``aclose``.",
"kind": "class",
"signature": "(base_url: 'str', *, credentials: 'ApiCredentials | None' = None, cookie: 'str | None' = None, http_client: 'httpx.AsyncClient | None' = None, timeout: 'float' = 30.0, headers: 'Mapping[str, str] | None' = None, allow_insecure_http: 'bool' = False) -> 'None'",
"members": [
{
"name": "aclose",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
}
],
"definedIn": "beyondigital_auth.api.AsyncAuthApiClient",
"source": {
"file": "src/beyondigital_auth/api.py",
"line": 52
}
}AuthApiClientclass
Every generated method, grouped by the service handler module that answers it.
{
"name": "AuthApiClient",
"description": "Every generated method, grouped by the service handler module that answers it.",
"kind": "class",
"signature": "(call: collections.abc.Callable[..., collections.abc.Awaitable[typing.Any]]) -> None",
"members": [],
"definedIn": "beyondigital_auth.generated.client.AuthApiClient",
"source": {
"file": "src/beyondigital_auth/generated/client.py",
"line": 5512
}
}CONTRACT_FINGERPRINTtype
{
"name": "CONTRACT_FINGERPRINT",
"description": "",
"kind": "type",
"type": "4337946102e2c613"
}CallOptionsclass
CallOptions(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None)
{
"name": "CallOptions",
"description": "CallOptions(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None)",
"kind": "class",
"signature": "(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.CallOptions",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 139
}
}ClientBasicCredentialclass
ClientBasicCredential(client_id: 'str', client_secret: 'str')
{
"name": "ClientBasicCredential",
"description": "ClientBasicCredential(client_id: 'str', client_secret: 'str')",
"kind": "class",
"signature": "(client_id: 'str', client_secret: 'str') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ClientBasicCredential",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 110
}
}EXCLUDED_OPERATIONStype
{
"name": "EXCLUDED_OPERATIONS",
"description": "",
"kind": "type",
"type": "<ExcludedOperations: 85 operations>",
"definedIn": "beyondigital_auth.api_transport.EXCLUDED_OPERATIONS"
}EXCLUSION_REASONStype
{
"name": "EXCLUSION_REASONS",
"description": "",
"kind": "type",
"type": "{'browser': 'Browser navigation, hosted page or static asset. It has no JSON or empty success response, so it is not a programmatic call.', 'internal': 'Service-to-service endpoint under /api/internal, not part of the public SDK surface.', 'legacy-redirect': 'Legacy admin-panel redirect kept only so old bookmarks land on the console.', 'mcp': 'MCP Streamable HTTP transport. Use an MCP client; the catalog of tools is in mcp-tools.json.', 'no-success': 'Declares no 2xx response (a method-not-allowed placeholder).', 'scim': 'SCIM 2.0 server protocol called by identity providers with a SCIM token. It is a server feature, not an SDK concern (R-21.3).'}"
}ExcludedOperationclass
ExcludedOperation(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str')
{
"name": "ExcludedOperation",
"description": "ExcludedOperation(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str')",
"kind": "class",
"signature": "(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ExcludedOperation",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 73
}
}NdjsonPageclass
An NDJSON export page: the raw text, each line parsed, and the cursor to pass as ``after`` for the next page.
{
"name": "NdjsonPage",
"description": "An NDJSON export page: the raw text, each line parsed, and the cursor to pass as ``after``\nfor the next page.",
"kind": "class",
"signature": "(text: 'str', lines: 'list[Any]', next_cursor: 'int | None') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.NdjsonPage",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 96
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}OPERATIONStype
{
"name": "OPERATIONS",
"description": "",
"kind": "type",
"type": "<OperationTable: 345 operations>",
"definedIn": "beyondigital_auth.api_transport.OPERATIONS"
}OperationDescriptorclass
What the generator knows about one operation. The transport reads nothing else about the contract.
{
"name": "OperationDescriptor",
"description": "What the generator knows about one operation. The transport reads nothing else about the\ncontract.",
"kind": "class",
"signature": "(operation_id: 'str', handler: 'str', surface: 'Surface', method: 'HttpMethod', path: 'str', path_params: 'tuple[str, ...]', catch_all: 'tuple[str, ...]', query: 'tuple[str, ...]', headers: 'tuple[str, ...]', body: 'OperationBody | None', response: 'ResponseKind', success_statuses: 'tuple[int, ...]', security: 'tuple[tuple[str, ...], ...]') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.OperationDescriptor",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 49
}
}UNSETtype
{
"name": "UNSET",
"description": "",
"kind": "type",
"type": "UNSET",
"definedIn": "beyondigital_auth.api_codec.UNSET"
}UnsetTypeclass
The type of ``UNSET``: a field the caller did not give. It is falsy and is never sent.
{
"name": "UnsetType",
"description": "The type of ``UNSET``: a field the caller did not give. It is falsy and is never sent.",
"kind": "class",
"signature": "() -> 'UnsetType'",
"members": [],
"definedIn": "beyondigital_auth.api_codec.UnsetType",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 25
}
}build_pathfunction
{
"name": "build_path",
"description": "",
"kind": "function",
"signature": "(descriptor: 'OperationDescriptor', path: 'Any') -> 'str'",
"definedIn": "beyondigital_auth.api_transport.build_path",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 279
}
}decodefunction
{
"name": "decode",
"description": "",
"kind": "function",
"signature": "(tp: 'Any', value: 'Any', path: 'str' = '#x27;, strict: 'bool' = False) -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.decode",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 84
}
}encodefunction
{
"name": "encode",
"description": "",
"kind": "function",
"signature": "(value: 'Any') -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.encode",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 169
}
}is_api_response_errorfunction
{
"name": "is_api_response_error",
"description": "",
"kind": "function",
"signature": "(error: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.api_errors.is_api_response_error",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 70
}
}typestype
{
"name": "types",
"description": "",
"kind": "type",
"type": "<module 'beyondigital_auth.generated.types' from '/Users/jai/Documents/GitHub/Py-mono/.claude/worktrees/auth-service-enterprise-sso-plan-b8fd29/sdk/auth/python/src/beyondigital_auth/generated/types.py'>"
}beyondigital_auth.api_codec
DecodeErrorclass
{
"name": "DecodeError",
"description": "",
"kind": "class",
"signature": "(path: 'str', message: 'str') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.api_codec.DecodeError",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 51
}
}UNSETtype
{
"name": "UNSET",
"description": "",
"kind": "type",
"type": "UNSET",
"definedIn": "beyondigital_auth.api_codec.UNSET"
}UnsetTypeclass
The type of ``UNSET``: a field the caller did not give. It is falsy and is never sent.
{
"name": "UnsetType",
"description": "The type of ``UNSET``: a field the caller did not give. It is falsy and is never sent.",
"kind": "class",
"signature": "() -> 'UnsetType'",
"members": [],
"definedIn": "beyondigital_auth.api_codec.UnsetType",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 25
}
}decodefunction
{
"name": "decode",
"description": "",
"kind": "function",
"signature": "(tp: 'Any', value: 'Any', path: 'str' = '#x27;, strict: 'bool' = False) -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.decode",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 84
}
}decode_responsefunction
``decode`` with the failure reported as the client error a caller handles.
{
"name": "decode_response",
"description": "``decode`` with the failure reported as the client error a caller handles.",
"kind": "function",
"signature": "(operation_id: 'str', tp: 'Any', value: 'Any') -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.decode_response",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 187
}
}encodefunction
{
"name": "encode",
"description": "",
"kind": "function",
"signature": "(value: 'Any') -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.encode",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 169
}
}beyondigital_auth.api_errors
ApiClientErrorclass
Raised before a request is sent (bad input, missing credential, bad base URL) or when a success body is not the shape the contract promises. ``code`` is one of ``CLIENT_ERROR_CODES``. The message never carries a token.
{
"name": "ApiClientError",
"description": "Raised before a request is sent (bad input, missing credential, bad base URL) or when a\nsuccess body is not the shape the contract promises. ``code`` is one of\n``CLIENT_ERROR_CODES``. The message never carries a token.",
"kind": "class",
"signature": "(code: 'str', message: 'str') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.api_errors.ApiClientError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 16
}
}ApiResponseErrorclass
The service answered with a non-2xx status. It holds the status, the server's error code and the request id, never the request, a header or a credential.
{
"name": "ApiResponseError",
"description": "The service answered with a non-2xx status. It holds the status, the server's error code and\nthe request id, never the request, a header or a credential.",
"kind": "class",
"signature": "(*, operation_id: 'str', method: 'str', path: 'str', status: 'int', reason: 'str' = '', code: 'str | None' = None, description: 'str | None' = None, request_id: 'str | None' = None, retry_after_seconds: 'int | None' = None, body: 'Any' = None) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.api_errors.ApiResponseError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 27
}
}is_api_response_errorfunction
{
"name": "is_api_response_error",
"description": "",
"kind": "function",
"signature": "(error: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.api_errors.is_api_response_error",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 70
}
}beyondigital_auth.api_transport
ApiClientErrorclass
Raised before a request is sent (bad input, missing credential, bad base URL) or when a success body is not the shape the contract promises. ``code`` is one of ``CLIENT_ERROR_CODES``. The message never carries a token.
{
"name": "ApiClientError",
"description": "Raised before a request is sent (bad input, missing credential, bad base URL) or when a\nsuccess body is not the shape the contract promises. ``code`` is one of\n``CLIENT_ERROR_CODES``. The message never carries a token.",
"kind": "class",
"signature": "(code: 'str', message: 'str') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.api_errors.ApiClientError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 16
}
}ApiCredentialsclass
One credential per security scheme named in the contract. The transport picks what an operation accepts.
{
"name": "ApiCredentials",
"description": "One credential per security scheme named in the contract. The transport picks what an\noperation accepts.",
"kind": "class",
"signature": "(bearer_auth: 'TokenSource | None' = None, management_oauth: 'TokenSource | None' = None, application_api_key: 'TokenSource | None' = None, scim_token: 'TokenSource | None' = None, client_basic: 'ClientBasicSource | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ApiCredentials",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 121
}
}ApiResponseErrorclass
The service answered with a non-2xx status. It holds the status, the server's error code and the request id, never the request, a header or a credential.
{
"name": "ApiResponseError",
"description": "The service answered with a non-2xx status. It holds the status, the server's error code and\nthe request id, never the request, a header or a credential.",
"kind": "class",
"signature": "(*, operation_id: 'str', method: 'str', path: 'str', status: 'int', reason: 'str' = '', code: 'str | None' = None, description: 'str | None' = None, request_id: 'str | None' = None, retry_after_seconds: 'int | None' = None, body: 'Any' = None) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.api_errors.ApiResponseError",
"source": {
"file": "src/beyondigital_auth/api_errors.py",
"line": 27
}
}ApiTransportclass
Executes descriptors over one ``httpx.AsyncClient``.
{
"name": "ApiTransport",
"description": "Executes descriptors over one ``httpx.AsyncClient``.",
"kind": "class",
"signature": "(base_url: 'str', operations: 'Mapping[str, OperationDescriptor]', credentials: 'ApiCredentials | None' = None, cookie: 'str | None' = None, http_client: 'httpx.AsyncClient | None' = None, timeout: 'float' = 30.0, headers: 'Mapping[str, str] | None' = None, allow_insecure_http: 'bool' = False) -> None",
"members": [
{
"name": "aclose",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "build_request",
"kind": "async method",
"signature": "(self, key: 'str', *, path: 'Any' = None, query: 'Any' = None, headers: 'Any' = None, body: 'Any' = UNSET, options: 'CallOptions | None' = None) -> 'tuple[OperationDescriptor, httpx.Request]'",
"description": ""
},
{
"name": "call",
"kind": "async method",
"signature": "(self, key: 'str', *, path: 'Any' = None, query: 'Any' = None, headers: 'Any' = None, body: 'Any' = UNSET, options: 'CallOptions | None' = None) -> 'Any'",
"description": "The function the generated client calls. ``key`` is an operation key of the generated\ntable."
}
],
"definedIn": "beyondigital_auth.api_transport.ApiTransport",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 471
}
}CallOptionsclass
CallOptions(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None)
{
"name": "CallOptions",
"description": "CallOptions(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None)",
"kind": "class",
"signature": "(timeout: 'float | None' = None, headers: 'Mapping[str, str] | None' = None, credentials: 'ApiCredentials | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.CallOptions",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 139
}
}ClientBasicCredentialclass
ClientBasicCredential(client_id: 'str', client_secret: 'str')
{
"name": "ClientBasicCredential",
"description": "ClientBasicCredential(client_id: 'str', client_secret: 'str')",
"kind": "class",
"signature": "(client_id: 'str', client_secret: 'str') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ClientBasicCredential",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 110
}
}ExcludedOperationclass
ExcludedOperation(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str')
{
"name": "ExcludedOperation",
"description": "ExcludedOperation(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str')",
"kind": "class",
"signature": "(operation_id: 'str', method: 'HttpMethod', path: 'str', handler: 'str', reason: 'str') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ExcludedOperation",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 73
}
}ExcludedOperationsclass
Contract operations the client has no method for. It prints as a count.
{
"name": "ExcludedOperations",
"description": "Contract operations the client has no method for. It prints as a count.",
"kind": "class",
"signature": "(iterable=(), /)",
"members": [],
"definedIn": "beyondigital_auth.api_transport.ExcludedOperations",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 89
}
}NdjsonPageclass
An NDJSON export page: the raw text, each line parsed, and the cursor to pass as ``after`` for the next page.
{
"name": "NdjsonPage",
"description": "An NDJSON export page: the raw text, each line parsed, and the cursor to pass as ``after``\nfor the next page.",
"kind": "class",
"signature": "(text: 'str', lines: 'list[Any]', next_cursor: 'int | None') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.NdjsonPage",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 96
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}OperationBodyclass
OperationBody(kind: "Literal['json', 'form']", required: 'bool')
{
"name": "OperationBody",
"description": "OperationBody(kind: \"Literal['json', 'form']\", required: 'bool')",
"kind": "class",
"signature": "(kind: \"Literal['json', 'form']\", required: 'bool') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.OperationBody",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 43
}
}OperationDescriptorclass
What the generator knows about one operation. The transport reads nothing else about the contract.
{
"name": "OperationDescriptor",
"description": "What the generator knows about one operation. The transport reads nothing else about the\ncontract.",
"kind": "class",
"signature": "(operation_id: 'str', handler: 'str', surface: 'Surface', method: 'HttpMethod', path: 'str', path_params: 'tuple[str, ...]', catch_all: 'tuple[str, ...]', query: 'tuple[str, ...]', headers: 'tuple[str, ...]', body: 'OperationBody | None', response: 'ResponseKind', success_statuses: 'tuple[int, ...]', security: 'tuple[tuple[str, ...], ...]') -> None",
"members": [],
"definedIn": "beyondigital_auth.api_transport.OperationDescriptor",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 49
}
}OperationTableclass
The generated descriptors by operation key. It prints as a count, not as every descriptor.
{
"name": "OperationTable",
"description": "The generated descriptors by operation key. It prints as a count, not as every descriptor.",
"kind": "class",
"signature": "",
"members": [],
"definedIn": "beyondigital_auth.api_transport.OperationTable",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 82
}
}UNSETtype
{
"name": "UNSET",
"description": "",
"kind": "type",
"type": "UNSET",
"definedIn": "beyondigital_auth.api_codec.UNSET"
}authorizationasync function
Which Authorization header an operation gets, or none. Raises when it needs a credential that was not supplied.
{
"name": "authorization",
"description": "Which Authorization header an operation gets, or none. Raises when it needs a credential\nthat was not supplied.",
"kind": "async function",
"signature": "(descriptor: 'OperationDescriptor', credentials: 'ApiCredentials', has_cookie: 'bool') -> 'str | None'",
"definedIn": "beyondigital_auth.api_transport.authorization",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 329
}
}build_pathfunction
{
"name": "build_path",
"description": "",
"kind": "function",
"signature": "(descriptor: 'OperationDescriptor', path: 'Any') -> 'str'",
"definedIn": "beyondigital_auth.api_transport.build_path",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 279
}
}encodefunction
{
"name": "encode",
"description": "",
"kind": "function",
"signature": "(value: 'Any') -> 'Any'",
"definedIn": "beyondigital_auth.api_codec.encode",
"source": {
"file": "src/beyondigital_auth/api_codec.py",
"line": 169
}
}encode_pairsfunction
Query and form encoding: arrays repeat the key, None and UNSET are left out, nested objects are refused.
{
"name": "encode_pairs",
"description": "Query and form encoding: arrays repeat the key, None and UNSET are left out, nested objects\nare refused.",
"kind": "function",
"signature": "(values: 'Mapping[str, Any]', where: 'str') -> 'list[tuple[str, str]]'",
"definedIn": "beyondigital_auth.api_transport.encode_pairs",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 231
}
}form_quotefunction
``application/x-www-form-urlencoded`` for one component: a space is ``+``, ``*-._`` and alphanumerics stay.
{
"name": "form_quote",
"description": "``application/x-www-form-urlencoded`` for one component: a space is ``+``, ``*-._`` and\nalphanumerics stay.",
"kind": "function",
"signature": "(value: 'str') -> 'str'",
"definedIn": "beyondigital_auth.api_transport.form_quote",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 215
}
}normalize_basefunction
{
"name": "normalize_base",
"description": "",
"kind": "function",
"signature": "(raw: 'str', allow_insecure_http: 'bool' = False) -> 'str'",
"definedIn": "beyondigital_auth.api_transport.normalize_base",
"source": {
"file": "src/beyondigital_auth/api_transport.py",
"line": 180
}
}beyondigital_auth.client
AsyncAuthClientclass
Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR. Also: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs, `private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).
{
"name": "AsyncAuthClient",
"description": "Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR.\n\nAlso: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs,\n`private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).",
"kind": "class",
"signature": "(issuer_url: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, redirect_uri: 'str | None' = None, scopes: 'list[str] | None' = None, http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0, token_endpoint_auth_method: \"Literal['none', 'client_secret_basic', 'client_secret_post', 'private_key_jwt'] | None\" = None, client_assertion_key: 'ClientAssertionKey | None' = None, dpop: 'DpopKey | None' = None) -> 'None'",
"members": [
{
"name": "client_credentials",
"kind": "async method",
"signature": "(self, resource: 'str | list[str]', scope: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "create_authorization_url",
"kind": "method",
"signature": "(self, code_challenge: 'str', code_challenge_method: 'str' = 'S256', scope: 'str | None' = None, state: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, client_id: 'str | None' = None) -> 'str'",
"description": ""
},
{
"name": "create_authorization_url_from_request_uri",
"kind": "method",
"signature": "(self, request_uri: 'str') -> 'str'",
"description": "The authorize URL for a pushed request: `client_id` and `request_uri` only."
},
{
"name": "create_end_session_url",
"kind": "method",
"signature": "(self, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"description": "The URL to send the person's browser to in order to end their session.\n\nUses the discovered `end_session_endpoint` when it is on the issuer's origin,\n`<issuer>/oauth/end_session` otherwise. The service redirects to `post_logout_redirect_uri`\nonly for an `id_token_hint` that names a client for which that URI is registered."
},
{
"name": "device_login",
"kind": "async method",
"signature": "(self, on_user_code: 'Callable[[DeviceAuthorization], Awaitable[None] | None]', scope: 'str | None' = None, resource: 'str | list[str] | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "`start_device_authorization`, hand the codes to `on_user_code`, then\n`poll_device_token`."
},
{
"name": "discover",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "discover_oauth",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "dpop_headers",
"kind": "method",
"signature": "(self, access_token: 'str', method: 'str', url: 'str') -> 'dict[str, str]'",
"description": "The `Authorization: DPoP <token>` and `DPoP: <proof>` headers for a request to any\nresource server, with the proof bound to the token (`ath`), the method and the URL\n(query and fragment excluded). Needs the `dpop` key. Call once per request: a proof is\nsingle use."
},
{
"name": "exchange_code",
"kind": "async method",
"signature": "(self, code: 'str', code_verifier: 'str', redirect_uri: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "exchange_token",
"kind": "async method",
"signature": "(self, subject_token: 'str', subject_token_type: 'str | None' = None, actor_token: 'str | None' = None, actor_token_type: 'str | None' = None, requested_token_type: 'str | None' = None, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": "Exchange an access token for a delegated one (the service's delegation grants decide\nwhether it may).\n\n`subject_token` is the delegator's access token; `actor_token` the acting party's. The\ntoken types default to the only one the service supports. Never carries a DPoP proof: the\nservice accepts one for the code and refresh grants only."
},
{
"name": "health",
"kind": "async method",
"signature": "(self) -> 'dict'",
"description": ""
},
{
"name": "introspect",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'IntrospectionResponse'",
"description": ""
},
{
"name": "jwks",
"kind": "async method",
"signature": "(self) -> 'JwksResponse'",
"description": ""
},
{
"name": "poll_device_token",
"kind": "async method",
"signature": "(self, device: 'DeviceAuthorization', client_id: 'str | None' = None, client_secret: 'str | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "Poll the token endpoint until the person approves.\n\nWaits the interval before each poll, adds five seconds after `slow_down`, and stops with\nthe service's `OAuthError` for `access_denied`, `expired_token` or anything else (and with\n`expired_token` once the device code's own lifetime would pass). Set the `cancel` event to\nstop (`DeviceFlowCancelled`). A network failure is raised as `NetworkError`, not retried;\ncall again with the same authorization to resume."
},
{
"name": "push_authorization_request",
"kind": "async method",
"signature": "(self, code_challenge: 'str', state: 'str | None' = None, scope: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, extra: 'Mapping[str, str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'PushedAuthorization'",
"description": "Send the authorize parameters to the service directly and get a one-use `request_uri`\nback, so the browser carries nothing the person could read or edit.\n\nAuthenticates like the token endpoint. Then redirect to\n`create_authorization_url_from_request_uri(result.request_uri)`."
},
{
"name": "refresh",
"kind": "async method",
"signature": "(self, refresh_token: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "register",
"kind": "async method",
"signature": "(self, redirect_uris: 'list[str]', client_name: 'str | None' = None, scope: 'str | None' = None, grant_types: 'list[str] | None' = None, response_types: 'list[str] | None' = None, token_endpoint_auth_method: 'str' = 'none', client_uri: 'str | None' = None, logo_uri: 'str | None' = None, application_type: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "revoke",
"kind": "async method",
"signature": "(self, token: 'str') -> 'None'",
"description": ""
},
{
"name": "start_device_authorization",
"kind": "async method",
"signature": "(self, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'DeviceAuthorization'",
"description": "Ask for a device code and a user code.\n\nShow `user_code` and `verification_uri` (or `verification_uri_complete`, for a QR code) to\nthe person, then call `poll_device_token`. The client must be registered for the\ndevice_code grant; a confidential client authenticates with its secret (`private_key_jwt`\nis not accepted at this endpoint by the service)."
},
{
"name": "userinfo",
"kind": "async method",
"signature": "(self, access_token: 'str', token_type: \"Literal['Bearer', 'DPoP']\" = 'Bearer') -> 'UserInfoResponse'",
"description": "`token_type=\"DPoP\"` for a token issued with a DPoP proof: sent under the DPoP scheme\nwith a proof bound to it."
}
],
"definedIn": "beyondigital_auth.client.AsyncAuthClient",
"source": {
"file": "src/beyondigital_auth/client.py",
"line": 93
}
}ClientAssertionKeyclass
A private key registered for a client. The private half cannot be read back from this object.
{
"name": "ClientAssertionKey",
"description": "A private key registered for a client. The private half cannot be read back from this\nobject.",
"kind": "class",
"signature": "(alg: 'str', kid: 'str | None', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, str | None]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.client_assertion.ClientAssertionKey",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 37
}
}DeviceAuthorizationclass
The answer to a device authorization request: show `user_code` and `verification_uri` to the person.
{
"name": "DeviceAuthorization",
"description": "The answer to a device authorization request: show `user_code` and `verification_uri` to the\nperson.",
"kind": "class",
"signature": "(device_code: 'str', user_code: 'str', verification_uri: 'str', expires_in: 'float', verification_uri_complete: 'str | None' = None, interval: 'int | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.DeviceAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 34
}
}DpopKeyclass
A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.
{
"name": "DpopKey",
"description": "A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read\nback.",
"kind": "class",
"signature": "(alg: 'str', public_jwk: 'dict[str, str]', thumbprint: 'str', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.dpop.DpopKey",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 54
}
}DpopRequestclass
What a request carries besides its DPoP proof.
{
"name": "DpopRequest",
"description": "What a request carries besides its DPoP proof.",
"kind": "class",
"signature": "(headers: 'dict[str, str]' = <factory>, content: 'str | bytes | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.dpop.DpopRequest",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 198
}
}DpopSessionclass
Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.
{
"name": "DpopSession",
"description": "Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry\non a nonce challenge.",
"kind": "class",
"signature": "(key: 'DpopKey') -> 'None'",
"members": [
{
"name": "fetch",
"kind": "async method",
"signature": "(self, fetcher: 'Fetcher', method: 'str', url: 'str', request: 'RequestSource' = None, access_token: 'str | None' = None) -> 'httpx.Response'",
"description": "`fetcher(method, url, headers, content)` is called with the proof added.\n\nA `DPoP` header the caller set is replaced. `access_token` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`request` 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\ncredential (a `private_key_jwt` assertion) can mint a new one instead of replaying the\nfirst."
},
{
"name": "headers",
"kind": "method",
"signature": "(self, method: 'str', url: 'str', access_token: 'str | None' = None) -> 'dict[str, str]'",
"description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a\ntoken goes with it.\n\nCall once per request: a proof is single use."
}
],
"definedIn": "beyondigital_auth.dpop.DpopSession",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 219
}
}IntrospectionResponseclass
{
"name": "IntrospectionResponse",
"description": "",
"kind": "class",
"signature": "(*, active: bool, iss: str | None = None, aud: typing.Any | None = None, scope: str | None = None, scopes: list[str] | None = None, client_id: str | None = None, sub: str | None = None, exp: int | None = None, central_user_id: str | None = None, is_system_admin: bool | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.IntrospectionResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 60
}
}JwksResponseclass
{
"name": "JwksResponse",
"description": "",
"kind": "class",
"signature": "(*, keys: list[beyondigital_auth.types.Jwk]) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.JwksResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 43
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}OidcMetadataclass
{
"name": "OidcMetadata",
"description": "",
"kind": "class",
"signature": "(*, issuer: str, authorization_endpoint: str, token_endpoint: str, userinfo_endpoint: str, registration_endpoint: str, jwks_uri: str, revocation_endpoint: str, introspection_endpoint: str, scopes_supported: list[str] = <factory>, response_types_supported: list[str] = <factory>, grant_types_supported: list[str] = <factory>, end_session_endpoint: str | None = None, device_authorization_endpoint: str | None = None, pushed_authorization_request_endpoint: str | None = None, require_pushed_authorization_requests: bool | None = None, dpop_signing_alg_values_supported: list[str] | None = None, token_endpoint_auth_signing_alg_values_supported: list[str] | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"serializationSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OidcMetadata",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 10
}
}PushedAuthorizationclass
PushedAuthorization(request_uri: 'str', expires_in: 'float')
{
"name": "PushedAuthorization",
"description": "PushedAuthorization(request_uri: 'str', expires_in: 'float')",
"kind": "class",
"signature": "(request_uri: 'str', expires_in: 'float') -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.PushedAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 177
}
}TokenResponseclass
{
"name": "TokenResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.TokenResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 47
}
}UserInfoResponseclass
{
"name": "UserInfoResponse",
"description": "",
"kind": "class",
"signature": "(*, sub: str, email: str, email_verified: bool, name: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.UserInfoResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 73
}
}assert_dpop_supportedfunction
The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.
{
"name": "assert_dpop_supported",
"description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a\nproof is sent.",
"kind": "function",
"signature": "(metadata: 'object', key: 'DpopKey') -> 'None'",
"definedIn": "beyondigital_auth.dpop.assert_dpop_supported",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 183
}
}build_authorization_url_from_request_urifunction
The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).
{
"name": "build_authorization_url_from_request_uri",
"description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section\n4).",
"kind": "function",
"signature": "(issuer_url: 'str', client_id: 'str', request_uri: 'str') -> 'str'",
"definedIn": "beyondigital_auth.flows.build_authorization_url_from_request_uri",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 258
}
}build_end_session_urlfunction
The URL to send the person's browser to in order to end their session at the service. `end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to `<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service redirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.
{
"name": "build_end_session_url",
"description": "The URL to send the person's browser to in order to end their session at the service.\n\n`end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to\n`<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service\nredirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.",
"kind": "function",
"signature": "(issuer_url: 'str', end_session_endpoint: 'str | None' = None, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.logout.build_end_session_url",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 181
}
}create_client_assertionfunction
A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`). `lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a real call leaves them out, so every assertion gets the current time and a fresh random `jti`.
{
"name": "create_client_assertion",
"description": "A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`).\n\n`lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a\nreal call leaves them out, so every assertion gets the current time and a fresh random `jti`.",
"kind": "function",
"signature": "(client_id: 'str', audience: 'str', key: 'ClientAssertionKey', lifetime_seconds: 'int | None' = None, now: 'int | None' = None, jti: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.client_assertion.create_client_assertion",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 89
}
}origin_offunction
`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).
{
"name": "origin_of",
"description": "`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).",
"kind": "function",
"signature": "(url: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.origin_of",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 49
}
}parse_device_authorizationfunction
Validate the service's device authorization answer; `ValueError` never echoes it.
{
"name": "parse_device_authorization",
"description": "Validate the service's device authorization answer; `ValueError` never echoes it.",
"kind": "function",
"signature": "(body: 'object') -> 'DeviceAuthorization'",
"definedIn": "beyondigital_auth.flows.parse_device_authorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 87
}
}parse_pushed_authorizationfunction
{
"name": "parse_pushed_authorization",
"description": "",
"kind": "function",
"signature": "(body: 'Any') -> 'PushedAuthorization'",
"definedIn": "beyondigital_auth.flows.parse_pushed_authorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 246
}
}poll_for_device_tokenasync function
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 raised 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 raised, not retried: call this again with the same authorization to resume. `sleep(seconds)` and `now()` (seconds) are for tests; `cancel` is an `asyncio.Event` that stops the wait and the flow with `DeviceFlowCancelled`.
{
"name": "poll_for_device_token",
"description": "Poll until the person decides (RFC 8628 section 3.5).\n\nThe wait comes before every poll; `slow_down` adds five seconds to every later wait;\n`authorization_pending` waits again; every other error (including `access_denied` and\n`expired_token`) ends the flow and is raised as the service sent it. The device code's own\nlifetime is enforced here too: no request is made once the next wait would pass it. A network\nfailure is raised, not retried: call this again with the same authorization to resume.\n\n`sleep(seconds)` and `now()` (seconds) are for tests; `cancel` is an `asyncio.Event` that stops\nthe wait and the flow with `DeviceFlowCancelled`.",
"kind": "async function",
"signature": "(device: 'DeviceAuthorization', request_token: 'Callable[[], Awaitable[TokenResponse]]', sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"definedIn": "beyondigital_auth.flows.poll_for_device_token",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 124
}
}pushed_request_paramsfunction
The authorize parameters of a pushed request, in order. `client_id` is set again by client authentication. `extra` carries more authorize parameters (`prompt`, `login_hint`, `max_age`, `organization` ...). Not allowed: anything that authenticates the client, `request`, `request_uri`, or a parameter this function already owns (in any letter case).
{
"name": "pushed_request_params",
"description": "The authorize parameters of a pushed request, in order. `client_id` is set again by client\nauthentication.\n\n`extra` carries more authorize parameters (`prompt`, `login_hint`, `max_age`, `organization`\n...). Not allowed: anything that authenticates the client, `request`, `request_uri`, or a\nparameter this function already owns (in any letter case).",
"kind": "function",
"signature": "(client_id: 'str', redirect_uri: 'str', code_challenge: 'str', state: 'str | None' = None, scope: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, extra: 'Mapping[str, str] | None' = None) -> 'list[tuple[str, str]]'",
"definedIn": "beyondigital_auth.flows.pushed_request_params",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 205
}
}beyondigital_auth.client_assertion
ClientAssertionKeyclass
A private key registered for a client. The private half cannot be read back from this object.
{
"name": "ClientAssertionKey",
"description": "A private key registered for a client. The private half cannot be read back from this\nobject.",
"kind": "class",
"signature": "(alg: 'str', kid: 'str | None', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, str | None]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.client_assertion.ClientAssertionKey",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 37
}
}assert_signing_algorithmfunction
{
"name": "assert_signing_algorithm",
"description": "",
"kind": "function",
"signature": "(alg: 'object', what: 'str') -> 'None'",
"definedIn": "beyondigital_auth.keys.assert_signing_algorithm",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 36
}
}create_client_assertionfunction
A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`). `lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a real call leaves them out, so every assertion gets the current time and a fresh random `jti`.
{
"name": "create_client_assertion",
"description": "A signed assertion for `audience` (`<issuer>/oauth/token` or `<issuer>/oauth/par`).\n\n`lifetime_seconds` is 1 to 300 (default 60). `now` (unix seconds) and `jti` are for tests: a\nreal call leaves them out, so every assertion gets the current time and a fresh random `jti`.",
"kind": "function",
"signature": "(client_id: 'str', audience: 'str', key: 'ClientAssertionKey', lifetime_seconds: 'int | None' = None, now: 'int | None' = None, jti: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.client_assertion.create_client_assertion",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 89
}
}import_client_assertion_keyfunction
Load a private key for `private_key_jwt`: a private JWK, a PKCS#8 PEM or a `cryptography` key object. Only RS256 (RSA, 2048 bits or more), PS256 (the same) and ES256 (P-256) are accepted.
{
"name": "import_client_assertion_key",
"description": "Load a private key for `private_key_jwt`: a private JWK, a PKCS#8 PEM or a `cryptography` key\nobject.\n\nOnly RS256 (RSA, 2048 bits or more), PS256 (the same) and ES256 (P-256) are accepted.",
"kind": "function",
"signature": "(alg: 'str', private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None, kid: 'str | None' = None) -> 'ClientAssertionKey'",
"definedIn": "beyondigital_auth.client_assertion.import_client_assertion_key",
"source": {
"file": "src/beyondigital_auth/client_assertion.py",
"line": 68
}
}load_private_signing_keyfunction
A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.
{
"name": "load_private_signing_key",
"description": "A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.",
"kind": "function",
"signature": "(alg: 'str', *, private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None) -> 'PrivateKey'",
"definedIn": "beyondigital_auth.keys.load_private_signing_key",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 146
}
}sign_jwsfunction
A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).
{
"name": "sign_jws",
"description": "A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).",
"kind": "function",
"signature": "(alg: 'str', key: 'PrivateKey', header: 'Mapping[str, Any]', claims: 'Mapping[str, Any]') -> 'str'",
"definedIn": "beyondigital_auth.keys.sign_jws",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 172
}
}beyondigital_auth.dpop
DpopKeyclass
A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read back.
{
"name": "DpopKey",
"description": "A DPoP key pair. The private half is held out of reach: it signs proofs and cannot be read\nback.",
"kind": "class",
"signature": "(alg: 'str', public_jwk: 'dict[str, str]', thumbprint: 'str', private_key: 'PrivateKey') -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict[str, Any]'",
"description": ""
}
],
"definedIn": "beyondigital_auth.dpop.DpopKey",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 54
}
}DpopRequestclass
What a request carries besides its DPoP proof.
{
"name": "DpopRequest",
"description": "What a request carries besides its DPoP proof.",
"kind": "class",
"signature": "(headers: 'dict[str, str]' = <factory>, content: 'str | bytes | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.dpop.DpopRequest",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 198
}
}DpopSessionclass
Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry on a nonce challenge.
{
"name": "DpopSession",
"description": "Sends requests with DPoP proofs: a fresh proof per request, the remembered nonce, one retry\non a nonce challenge.",
"kind": "class",
"signature": "(key: 'DpopKey') -> 'None'",
"members": [
{
"name": "fetch",
"kind": "async method",
"signature": "(self, fetcher: 'Fetcher', method: 'str', url: 'str', request: 'RequestSource' = None, access_token: 'str | None' = None) -> 'httpx.Response'",
"description": "`fetcher(method, url, headers, content)` is called with the proof added.\n\nA `DPoP` header the caller set is replaced. `access_token` adds `ath` (it does not add an\nAuthorization header: the caller owns that).\n\n`request` 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\ncredential (a `private_key_jwt` assertion) can mint a new one instead of replaying the\nfirst."
},
{
"name": "headers",
"kind": "method",
"signature": "(self, method: 'str', url: 'str', access_token: 'str | None' = None) -> 'dict[str, str]'",
"description": "The headers to put on a request: `DPoP` always, `Authorization: DPoP <token>` when a\ntoken goes with it.\n\nCall once per request: a proof is single use."
}
],
"definedIn": "beyondigital_auth.dpop.DpopSession",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 219
}
}assert_dpop_supportedfunction
The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a proof is sent.
{
"name": "assert_dpop_supported",
"description": "The service must advertise the key's algorithm (`dpop_signing_alg_values_supported`) before a\nproof is sent.",
"kind": "function",
"signature": "(metadata: 'object', key: 'DpopKey') -> 'None'",
"definedIn": "beyondigital_auth.dpop.assert_dpop_supported",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 183
}
}assert_signing_algorithmfunction
{
"name": "assert_signing_algorithm",
"description": "",
"kind": "function",
"signature": "(alg: 'object', what: 'str') -> 'None'",
"definedIn": "beyondigital_auth.keys.assert_signing_algorithm",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 36
}
}b64url_encodefunction
{
"name": "b64url_encode",
"description": "",
"kind": "function",
"signature": "(data: 'bytes') -> 'str'",
"definedIn": "beyondigital_auth.keys.b64url_encode",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 28
}
}create_dpop_prooffunction
A DPoP proof JWT for one request. `method` is upper-cased; `url`'s query and fragment are not part of the proof; `access_token` adds `ath` (a request made with that token); `nonce` is one the server gave. `now` (unix seconds) and `jti` are for tests: a real call leaves them out so every proof is fresh and has its own `jti`.
{
"name": "create_dpop_proof",
"description": "A DPoP proof JWT for one request.\n\n`method` is upper-cased; `url`'s query and fragment are not part of the proof; `access_token`\nadds `ath` (a request made with that token); `nonce` is one the server gave. `now` (unix\nseconds) and `jti` are for tests: a real call leaves them out so every proof is fresh and has\nits own `jti`.",
"kind": "function",
"signature": "(key: 'DpopKey', method: 'str', url: 'str', access_token: 'str | None' = None, nonce: 'str | None' = None, now: 'int | None' = None, jti: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.dpop.create_dpop_proof",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 145
}
}dpop_access_token_hashfunction
`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).
{
"name": "dpop_access_token_hash",
"description": "`ath`: base64url SHA-256 of an access token (RFC 9449 section 4.2).",
"kind": "function",
"signature": "(access_token: 'str') -> 'str'",
"definedIn": "beyondigital_auth.dpop.dpop_access_token_hash",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 95
}
}dpop_htufunction
`htu`: the request URL without query or fragment, scheme and host lower-cased, default port dropped.
{
"name": "dpop_htu",
"description": "`htu`: the request URL without query or fragment, scheme and host lower-cased, default port\ndropped.",
"kind": "function",
"signature": "(url: 'str') -> 'str'",
"definedIn": "beyondigital_auth.dpop.dpop_htu",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 100
}
}dpop_thumbprintfunction
RFC 7638 thumbprint (base64url SHA-256) of a public JWK.
{
"name": "dpop_thumbprint",
"description": "RFC 7638 thumbprint (base64url SHA-256) of a public JWK.",
"kind": "function",
"signature": "(jwk: 'Mapping[str, str]') -> 'str'",
"definedIn": "beyondigital_auth.dpop.dpop_thumbprint",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 90
}
}generate_dpop_keyfunction
A new key pair: ES256 (P-256, the default), PS256 or RS256 (RSA 2048).
{
"name": "generate_dpop_key",
"description": "A new key pair: ES256 (P-256, the default), PS256 or RS256 (RSA 2048).",
"kind": "function",
"signature": "(alg: 'DpopAlgorithm' = 'ES256') -> 'DpopKey'",
"definedIn": "beyondigital_auth.dpop.generate_dpop_key",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 120
}
}import_dpop_keyfunction
Use a key you already hold (a private JWK, a PKCS#8 PEM or a `cryptography` key object).
{
"name": "import_dpop_key",
"description": "Use a key you already hold (a private JWK, a PKCS#8 PEM or a `cryptography` key object).",
"kind": "function",
"signature": "(alg: 'DpopAlgorithm', private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None) -> 'DpopKey'",
"definedIn": "beyondigital_auth.dpop.import_dpop_key",
"source": {
"file": "src/beyondigital_auth/dpop.py",
"line": 131
}
}load_private_signing_keyfunction
A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.
{
"name": "load_private_signing_key",
"description": "A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.",
"kind": "function",
"signature": "(alg: 'str', *, private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None) -> 'PrivateKey'",
"definedIn": "beyondigital_auth.keys.load_private_signing_key",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 146
}
}normalise_htufunction
The URL without query or fragment: scheme and host lower-cased, default port dropped.
{
"name": "normalise_htu",
"description": "The URL without query or fragment: scheme and host lower-cased, default port dropped.",
"kind": "function",
"signature": "(url: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.normalise_htu",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 81
}
}origin_offunction
`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).
{
"name": "origin_of",
"description": "`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).",
"kind": "function",
"signature": "(url: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.origin_of",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 49
}
}public_jwk_offunction
The public members of a key as a JWK, and nothing else (no `d`, no CRT parameters).
{
"name": "public_jwk_of",
"description": "The public members of a key as a JWK, and nothing else (no `d`, no CRT parameters).",
"kind": "function",
"signature": "(key: 'PrivateKey') -> 'dict[str, str]'",
"definedIn": "beyondigital_auth.keys.public_jwk_of",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 45
}
}sign_jwsfunction
A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).
{
"name": "sign_jws",
"description": "A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).",
"kind": "function",
"signature": "(alg: 'str', key: 'PrivateKey', header: 'Mapping[str, Any]', claims: 'Mapping[str, Any]') -> 'str'",
"definedIn": "beyondigital_auth.keys.sign_jws",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 172
}
}thumbprint_offunction
RFC 7638 SHA-256 thumbprint (base64url) of a public EC or RSA JWK.
{
"name": "thumbprint_of",
"description": "RFC 7638 SHA-256 thumbprint (base64url) of a public EC or RSA JWK.",
"kind": "function",
"signature": "(public_jwk: 'Mapping[str, str]') -> 'str'",
"definedIn": "beyondigital_auth.keys.thumbprint_of",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 63
}
}beyondigital_auth.errors
JwtErrorclass
JWT validation failure.
{
"name": "JwtError",
"description": "JWT validation failure.",
"kind": "class",
"signature": "(message: 'str', code: 'str' = 'invalid') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.JwtError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 23
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}beyondigital_auth.flows
DeviceAuthorizationclass
The answer to a device authorization request: show `user_code` and `verification_uri` to the person.
{
"name": "DeviceAuthorization",
"description": "The answer to a device authorization request: show `user_code` and `verification_uri` to the\nperson.",
"kind": "class",
"signature": "(device_code: 'str', user_code: 'str', verification_uri: 'str', expires_in: 'float', verification_uri_complete: 'str | None' = None, interval: 'int | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.DeviceAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 34
}
}DeviceFlowCancelledclass
The caller set the `cancel` event: the device flow stopped without a token.
{
"name": "DeviceFlowCancelled",
"description": "The caller set the `cancel` event: the device flow stopped without a token.",
"kind": "class",
"signature": "() -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.flows.DeviceFlowCancelled",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 53
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}PushedAuthorizationclass
PushedAuthorization(request_uri: 'str', expires_in: 'float')
{
"name": "PushedAuthorization",
"description": "PushedAuthorization(request_uri: 'str', expires_in: 'float')",
"kind": "class",
"signature": "(request_uri: 'str', expires_in: 'float') -> None",
"members": [],
"definedIn": "beyondigital_auth.flows.PushedAuthorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 177
}
}TokenResponseclass
{
"name": "TokenResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.TokenResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 47
}
}build_authorization_url_from_request_urifunction
The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section 4).
{
"name": "build_authorization_url_from_request_uri",
"description": "The authorize URL for a pushed request: only `client_id` and `request_uri` (RFC 9126 section\n4).",
"kind": "function",
"signature": "(issuer_url: 'str', client_id: 'str', request_uri: 'str') -> 'str'",
"definedIn": "beyondigital_auth.flows.build_authorization_url_from_request_uri",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 258
}
}form_urlencodefunction
application/x-www-form-urlencoded for one value (a space is `+`, `~` is escaped, `*` is not).
{
"name": "form_urlencode",
"description": "application/x-www-form-urlencoded for one value (a space is `+`, `~` is escaped, `*` is\nnot).",
"kind": "function",
"signature": "(value: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.form_urlencode",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 92
}
}parse_device_authorizationfunction
Validate the service's device authorization answer; `ValueError` never echoes it.
{
"name": "parse_device_authorization",
"description": "Validate the service's device authorization answer; `ValueError` never echoes it.",
"kind": "function",
"signature": "(body: 'object') -> 'DeviceAuthorization'",
"definedIn": "beyondigital_auth.flows.parse_device_authorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 87
}
}parse_pushed_authorizationfunction
{
"name": "parse_pushed_authorization",
"description": "",
"kind": "function",
"signature": "(body: 'Any') -> 'PushedAuthorization'",
"definedIn": "beyondigital_auth.flows.parse_pushed_authorization",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 246
}
}poll_for_device_tokenasync function
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 raised 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 raised, not retried: call this again with the same authorization to resume. `sleep(seconds)` and `now()` (seconds) are for tests; `cancel` is an `asyncio.Event` that stops the wait and the flow with `DeviceFlowCancelled`.
{
"name": "poll_for_device_token",
"description": "Poll until the person decides (RFC 8628 section 3.5).\n\nThe wait comes before every poll; `slow_down` adds five seconds to every later wait;\n`authorization_pending` waits again; every other error (including `access_denied` and\n`expired_token`) ends the flow and is raised as the service sent it. The device code's own\nlifetime is enforced here too: no request is made once the next wait would pass it. A network\nfailure is raised, not retried: call this again with the same authorization to resume.\n\n`sleep(seconds)` and `now()` (seconds) are for tests; `cancel` is an `asyncio.Event` that stops\nthe wait and the flow with `DeviceFlowCancelled`.",
"kind": "async function",
"signature": "(device: 'DeviceAuthorization', request_token: 'Callable[[], Awaitable[TokenResponse]]', sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"definedIn": "beyondigital_auth.flows.poll_for_device_token",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 124
}
}pushed_request_paramsfunction
The authorize parameters of a pushed request, in order. `client_id` is set again by client authentication. `extra` carries more authorize parameters (`prompt`, `login_hint`, `max_age`, `organization` ...). Not allowed: anything that authenticates the client, `request`, `request_uri`, or a parameter this function already owns (in any letter case).
{
"name": "pushed_request_params",
"description": "The authorize parameters of a pushed request, in order. `client_id` is set again by client\nauthentication.\n\n`extra` carries more authorize parameters (`prompt`, `login_hint`, `max_age`, `organization`\n...). Not allowed: anything that authenticates the client, `request`, `request_uri`, or a\nparameter this function already owns (in any letter case).",
"kind": "function",
"signature": "(client_id: 'str', redirect_uri: 'str', code_challenge: 'str', state: 'str | None' = None, scope: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, extra: 'Mapping[str, str] | None' = None) -> 'list[tuple[str, str]]'",
"definedIn": "beyondigital_auth.flows.pushed_request_params",
"source": {
"file": "src/beyondigital_auth/flows.py",
"line": 205
}
}beyondigital_auth.generated
AuthApiClientclass
Every generated method, grouped by the service handler module that answers it.
{
"name": "AuthApiClient",
"description": "Every generated method, grouped by the service handler module that answers it.",
"kind": "class",
"signature": "(call: collections.abc.Callable[..., collections.abc.Awaitable[typing.Any]]) -> None",
"members": [],
"definedIn": "beyondigital_auth.generated.client.AuthApiClient",
"source": {
"file": "src/beyondigital_auth/generated/client.py",
"line": 5512
}
}CONTRACT_FINGERPRINTtype
{
"name": "CONTRACT_FINGERPRINT",
"description": "",
"kind": "type",
"type": "4337946102e2c613"
}EXCLUDED_OPERATIONStype
{
"name": "EXCLUDED_OPERATIONS",
"description": "",
"kind": "type",
"type": "<ExcludedOperations: 85 operations>",
"definedIn": "beyondigital_auth.api_transport.EXCLUDED_OPERATIONS"
}EXCLUSION_REASONStype
{
"name": "EXCLUSION_REASONS",
"description": "",
"kind": "type",
"type": "{'browser': 'Browser navigation, hosted page or static asset. It has no JSON or empty success response, so it is not a programmatic call.', 'internal': 'Service-to-service endpoint under /api/internal, not part of the public SDK surface.', 'legacy-redirect': 'Legacy admin-panel redirect kept only so old bookmarks land on the console.', 'mcp': 'MCP Streamable HTTP transport. Use an MCP client; the catalog of tools is in mcp-tools.json.', 'no-success': 'Declares no 2xx response (a method-not-allowed placeholder).', 'scim': 'SCIM 2.0 server protocol called by identity providers with a SCIM token. It is a server feature, not an SDK concern (R-21.3).'}"
}OPERATIONStype
{
"name": "OPERATIONS",
"description": "",
"kind": "type",
"type": "<OperationTable: 345 operations>",
"definedIn": "beyondigital_auth.api_transport.OPERATIONS"
}beyondigital_auth.jwt
AsyncMultiIssuerVerifierclass
Verify RS256 access tokens from an explicit allow-list of issuers. `verify()` is the production surface: RFC 9068 `at+jwt` typ by default, the issuer allow-list + audience pins, and one bounded JWKS refresh on a kid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching auth_service's `decode_with_policy` semantics exactly.
{
"name": "AsyncMultiIssuerVerifier",
"description": "Verify RS256 access tokens from an explicit allow-list of issuers.\n\n`verify()` is the production surface: RFC 9068 `at+jwt` typ by default,\nthe issuer allow-list + audience pins, and one bounded JWKS refresh on a\nkid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching\nauth_service's `decode_with_policy` semantics exactly.",
"kind": "class",
"signature": "(issuers: 'list[str | IssuerConfig]', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, clock_skew_sec: 'int' = 0, http_client: 'httpx.AsyncClient | None' = None, require_at_jwt: 'bool' = True, min_jwks_fetch_interval_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "issuers",
"kind": "property",
"signature": "(self) -> 'list[str]'",
"description": "The normalised issuer allow-list, in configuration order."
},
{
"name": "set_issuer_jwks_uri",
"kind": "method",
"signature": "(self, issuer_url: 'str', uri: 'str') -> 'None'",
"description": "Set/override one issuer's JWKS URI after discovery. The issuer must\nbe allow-listed; its cache is dropped."
},
{
"name": "verify",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str | list[str] | None' = None, issuer: 'str | None' = None) -> 'CurrentUser'",
"description": "Verify an access token and return the CurrentUser (with the\nverified `issuer`). `issuer` may only narrow to one allow-listed issuer."
},
{
"name": "verify_claims",
"kind": "async method",
"signature": "(self, token: 'str', policy: 'ValidationPolicy') -> 'dict'",
"description": "Verify `token` against `policy`: JOSE typ (when the purpose\ncarries `at+jwt`), issuer allow-list (before any fetch), kid-pinned\nsignature with the key's own algorithm + expiry, then the claim\ncontract (type, required claims, iss/aud allow-lists)."
},
{
"name": "verify_logout_token",
"kind": "async method",
"signature": "(self, token: 'str', client_id: 'str | list[str]', now: 'float | None' = None, max_age_seconds: 'float | None' = None, consume_jti: 'ConsumeJti | None' = None) -> 'LogoutToken'",
"description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs\nto a client'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\npass as one); `iss` is on the issuer allow-list (before any JWKS request); the signature\nverifies under the key the issuer publishes for the token's `kid`, with the algorithm\nthe key dictates, and the token has not expired; `aud` names this client; `iat`, `exp`\nand `jti` are present and `iat` is recent; `events` has the back-channel logout member\nas an object; there is no `nonce`; and `sub`, `sid` or both are present. Anything else\nraises `LogoutTokenError` with a `reason` and a fixed message.\n\n`consume_jti(jti, expires_at)` is optional replay protection, called once after every\nother check passed; return False when that `jti` was seen before. The service re-sends a\ndelivery with the same `jti` until it gets a 2xx, so record the `jti` only once you have\nended the session, or a retry after your own failure will be refused as a replay.\n\nAnswer 200 (or 204) to the service only after this returns and you have ended the\nsession; answer 400 for a `LogoutTokenError`. A failure fetching the JWKS surfaces as\n`NetworkError`: answer 5xx so the service retries."
}
],
"definedIn": "beyondigital_auth.jwt.AsyncMultiIssuerVerifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 201
}
}AsyncTokenVerifierclass
Single-issuer verifier: the original API, as a one-issuer `AsyncMultiIssuerVerifier`.
{
"name": "AsyncTokenVerifier",
"description": "Single-issuer verifier: the original API, as a one-issuer\n`AsyncMultiIssuerVerifier`.",
"kind": "class",
"signature": "(issuer_url: 'str', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, clock_skew_sec: 'int' = 0, http_client: 'httpx.AsyncClient | None' = None, require_at_jwt: 'bool' = True, min_jwks_fetch_interval_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "issuers",
"kind": "property",
"signature": "(self) -> 'list[str]'",
"description": "The normalised issuer allow-list, in configuration order."
},
{
"name": "set_issuer_jwks_uri",
"kind": "method",
"signature": "(self, issuer_url: 'str', uri: 'str') -> 'None'",
"description": "Set/override one issuer's JWKS URI after discovery. The issuer must\nbe allow-listed; its cache is dropped."
},
{
"name": "set_jwks_uri",
"kind": "method",
"signature": "(self, uri: 'str') -> 'None'",
"description": ""
},
{
"name": "verify",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str | list[str] | None' = None, issuer: 'str | None' = None) -> 'CurrentUser'",
"description": "Verify an access token and return the CurrentUser (with the\nverified `issuer`). `issuer` may only narrow to one allow-listed issuer."
},
{
"name": "verify_claims",
"kind": "async method",
"signature": "(self, token: 'str', policy: 'ValidationPolicy') -> 'dict'",
"description": "Verify `token` against `policy`: JOSE typ (when the purpose\ncarries `at+jwt`), issuer allow-list (before any fetch), kid-pinned\nsignature with the key's own algorithm + expiry, then the claim\ncontract (type, required claims, iss/aud allow-lists)."
},
{
"name": "verify_logout_token",
"kind": "async method",
"signature": "(self, token: 'str', client_id: 'str | list[str]', now: 'float | None' = None, max_age_seconds: 'float | None' = None, consume_jti: 'ConsumeJti | None' = None) -> 'LogoutToken'",
"description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs\nto a client'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\npass as one); `iss` is on the issuer allow-list (before any JWKS request); the signature\nverifies under the key the issuer publishes for the token's `kid`, with the algorithm\nthe key dictates, and the token has not expired; `aud` names this client; `iat`, `exp`\nand `jti` are present and `iat` is recent; `events` has the back-channel logout member\nas an object; there is no `nonce`; and `sub`, `sid` or both are present. Anything else\nraises `LogoutTokenError` with a `reason` and a fixed message.\n\n`consume_jti(jti, expires_at)` is optional replay protection, called once after every\nother check passed; return False when that `jti` was seen before. The service re-sends a\ndelivery with the same `jti` until it gets a 2xx, so record the `jti` only once you have\nended the session, or a retry after your own failure will be refused as a replay.\n\nAnswer 200 (or 204) to the service only after this returns and you have ended the\nsession; answer 400 for a `LogoutTokenError`. A failure fetching the JWKS surfaces as\n`NetworkError`: answer 5xx so the service retries."
}
],
"definedIn": "beyondigital_auth.jwt.AsyncTokenVerifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 553
}
}CurrentUserclass
Verified identity from an access token (mirrors shared/auth/schemas.py).
{
"name": "CurrentUser",
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"kind": "class",
"signature": "(*, id: str, email: str = '', scopes: list[str] = <factory>, is_active: bool = True, firm_id: str | None = None, auth_user_id: str | None = None, session_id: str | None = None, app: str | None = None, token_version: int = 0, permissions_version: int = 0, is_system_admin: bool = False, identity_class: str | None = None, issuer: str | None = None) -> None",
"members": [
{
"name": "central_identity_id",
"kind": "property",
"signature": "(self) -> 'str'",
"description": ""
},
{
"name": "has_scope",
"kind": "method",
"signature": "(self, scope: 'str') -> 'bool'",
"description": ""
},
{
"name": "is_admin",
"kind": "method",
"signature": "(self) -> 'bool'",
"description": ""
}
],
"jsonSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"serializationSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CurrentUser",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 115
}
}IssuerConfigclass
One allow-listed issuer. `jwks_uri` overrides the default `<issuer>/.well-known/jwks.json` (set it from discovery).
{
"name": "IssuerConfig",
"description": "One allow-listed issuer. `jwks_uri` overrides the default\n`<issuer>/.well-known/jwks.json` (set it from discovery).",
"kind": "class",
"signature": "(issuer_url: 'str', jwks_uri: 'str | None' = None) -> None",
"members": [],
"definedIn": "beyondigital_auth.jwt.IssuerConfig",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 106
}
}JwtErrorclass
JWT validation failure.
{
"name": "JwtError",
"description": "JWT validation failure.",
"kind": "class",
"signature": "(message: 'str', code: 'str' = 'invalid') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.JwtError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 23
}
}LogoutTokenclass
What a verified logout token tells the relying party.
{
"name": "LogoutToken",
"description": "What a verified logout token tells the relying party.",
"kind": "class",
"signature": "(issuer: 'str', jti: 'str', issued_at: 'float', expires_at: 'float', subject: 'str | None' = None, session_id: 'str | None' = None, claims: 'dict[str, Any]' = <factory>) -> None",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutToken",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 84
}
}LogoutTokenErrorclass
A back-channel logout token that must not be acted on. `reason` says which rule it broke.
{
"name": "LogoutTokenError",
"description": "A back-channel logout token that must not be acted on. `reason` says which rule it broke.",
"kind": "class",
"signature": "(reason: 'LogoutFailure') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutTokenError",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 76
}
}NetworkErrorclass
Transport failure.
{
"name": "NetworkError",
"description": "Transport failure.",
"kind": "class",
"signature": "(message: 'str', cause: 'BaseException | None' = None) -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.NetworkError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 33
}
}ValidationPolicyclass
ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)
{
"name": "ValidationPolicy",
"description": "ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)",
"kind": "class",
"signature": "(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True) -> None",
"members": [
{
"name": "access",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "allow_legacy_typ",
"kind": "method",
"signature": "(self) -> 'ValidationPolicy'",
"description": "Compat window for pre-WP-03b access tokens with no `typ` header."
},
{
"name": "id_token",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "internal_assertion",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "refresh",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_expected_audiences",
"kind": "method",
"signature": "(self, audiences: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_trusted_issuers",
"kind": "method",
"signature": "(self, issuers: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
}
],
"definedIn": "beyondigital_auth.policy.ValidationPolicy",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 37
}
}check_logout_claimsfunction
The checks on a logout token whose signature and expiry already verified. Raises `LogoutTokenError`.
{
"name": "check_logout_claims",
"description": "The checks on a logout token whose signature and expiry already verified. Raises\n`LogoutTokenError`.",
"kind": "function",
"signature": "(claims: 'Mapping[str, Any]', client_ids: 'list[str]', now: 'float', max_age_seconds: 'float', skew_seconds: 'float') -> 'LogoutToken'",
"definedIn": "beyondigital_auth.logout.check_logout_claims",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 132
}
}create_multi_issuer_verifierfunction
{
"name": "create_multi_issuer_verifier",
"description": "",
"kind": "function",
"signature": "(issuers: 'list[str | IssuerConfig]', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, http_client: 'httpx.AsyncClient | None' = None) -> 'AsyncMultiIssuerVerifier'",
"definedIn": "beyondigital_auth.jwt.create_multi_issuer_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 593
}
}create_verifierfunction
{
"name": "create_verifier",
"description": "",
"kind": "function",
"signature": "(issuer_url: 'str', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, http_client: 'httpx.AsyncClient | None' = None) -> 'AsyncTokenVerifier'",
"definedIn": "beyondigital_auth.jwt.create_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 584
}
}generate_code_challengefunction
{
"name": "generate_code_challenge",
"description": "",
"kind": "function",
"signature": "(verifier: 'str') -> 'str'",
"definedIn": "beyondigital_auth.jwt.generate_code_challenge",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 58
}
}generate_code_verifierfunction
{
"name": "generate_code_verifier",
"description": "",
"kind": "function",
"signature": "() -> 'str'",
"definedIn": "beyondigital_auth.jwt.generate_code_verifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 53
}
}is_finite_numberfunction
{
"name": "is_finite_number",
"description": "",
"kind": "function",
"signature": "(value: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.logout.is_finite_number",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 115
}
}is_logout_typfunction
{
"name": "is_logout_typ",
"description": "",
"kind": "function",
"signature": "(typ: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.logout.is_logout_typ",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 104
}
}normalise_client_idsfunction
{
"name": "normalise_client_ids",
"description": "",
"kind": "function",
"signature": "(client_id: 'object') -> 'list[str]'",
"definedIn": "beyondigital_auth.logout.normalise_client_ids",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 124
}
}validate_claimsfunction
Bind a verified claim set to its purpose — byte-for-byte port of the service's `validate_claims`.
{
"name": "validate_claims",
"description": "Bind a verified claim set to its purpose — byte-for-byte port of the\nservice's `validate_claims`.",
"kind": "function",
"signature": "(claims: 'dict', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_claims",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 115
}
}validate_typ_headerfunction
{
"name": "validate_typ_header",
"description": "",
"kind": "function",
"signature": "(typ: 'str | None', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_typ_header",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 86
}
}beyondigital_auth.keys
assert_signing_algorithmfunction
{
"name": "assert_signing_algorithm",
"description": "",
"kind": "function",
"signature": "(alg: 'object', what: 'str') -> 'None'",
"definedIn": "beyondigital_auth.keys.assert_signing_algorithm",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 36
}
}b64url_decodefunction
{
"name": "b64url_decode",
"description": "",
"kind": "function",
"signature": "(text: 'str') -> 'bytes'",
"definedIn": "beyondigital_auth.keys.b64url_decode",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 32
}
}b64url_encodefunction
{
"name": "b64url_encode",
"description": "",
"kind": "function",
"signature": "(data: 'bytes') -> 'str'",
"definedIn": "beyondigital_auth.keys.b64url_encode",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 28
}
}load_private_signing_keyfunction
A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.
{
"name": "load_private_signing_key",
"description": "A private key from a private JWK, a PKCS#8 PEM, or an object from `cryptography`.",
"kind": "function",
"signature": "(alg: 'str', *, private_jwk: 'Mapping[str, Any] | None' = None, private_pem: 'str | bytes | None' = None, private_key: 'object | None' = None) -> 'PrivateKey'",
"definedIn": "beyondigital_auth.keys.load_private_signing_key",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 146
}
}public_jwk_offunction
The public members of a key as a JWK, and nothing else (no `d`, no CRT parameters).
{
"name": "public_jwk_of",
"description": "The public members of a key as a JWK, and nothing else (no `d`, no CRT parameters).",
"kind": "function",
"signature": "(key: 'PrivateKey') -> 'dict[str, str]'",
"definedIn": "beyondigital_auth.keys.public_jwk_of",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 45
}
}sign_jwsfunction
A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).
{
"name": "sign_jws",
"description": "A compact JWS over `header` and `claims`, signed with `key` under `alg` (ES256 as r||s).",
"kind": "function",
"signature": "(alg: 'str', key: 'PrivateKey', header: 'Mapping[str, Any]', claims: 'Mapping[str, Any]') -> 'str'",
"definedIn": "beyondigital_auth.keys.sign_jws",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 172
}
}thumbprint_offunction
RFC 7638 SHA-256 thumbprint (base64url) of a public EC or RSA JWK.
{
"name": "thumbprint_of",
"description": "RFC 7638 SHA-256 thumbprint (base64url) of a public EC or RSA JWK.",
"kind": "function",
"signature": "(public_jwk: 'Mapping[str, str]') -> 'str'",
"definedIn": "beyondigital_auth.keys.thumbprint_of",
"source": {
"file": "src/beyondigital_auth/keys.py",
"line": 63
}
}beyondigital_auth.logout
JwtErrorclass
JWT validation failure.
{
"name": "JwtError",
"description": "JWT validation failure.",
"kind": "class",
"signature": "(message: 'str', code: 'str' = 'invalid') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.JwtError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 23
}
}LogoutTokenclass
What a verified logout token tells the relying party.
{
"name": "LogoutToken",
"description": "What a verified logout token tells the relying party.",
"kind": "class",
"signature": "(issuer: 'str', jti: 'str', issued_at: 'float', expires_at: 'float', subject: 'str | None' = None, session_id: 'str | None' = None, claims: 'dict[str, Any]' = <factory>) -> None",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutToken",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 84
}
}LogoutTokenErrorclass
A back-channel logout token that must not be acted on. `reason` says which rule it broke.
{
"name": "LogoutTokenError",
"description": "A back-channel logout token that must not be acted on. `reason` says which rule it broke.",
"kind": "class",
"signature": "(reason: 'LogoutFailure') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.logout.LogoutTokenError",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 76
}
}build_end_session_urlfunction
The URL to send the person's browser to in order to end their session at the service. `end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to `<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service redirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.
{
"name": "build_end_session_url",
"description": "The URL to send the person's browser to in order to end their session at the service.\n\n`end_session_endpoint` (the discovered one) must be on the issuer's origin; it defaults to\n`<issuer>/oauth/end_session`. `post_logout_redirect_uri` needs `id_token_hint` (the service\nredirects only for a client it can identify) and `state` needs `post_logout_redirect_uri`.",
"kind": "function",
"signature": "(issuer_url: 'str', end_session_endpoint: 'str | None' = None, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"definedIn": "beyondigital_auth.logout.build_end_session_url",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 181
}
}check_logout_claimsfunction
The checks on a logout token whose signature and expiry already verified. Raises `LogoutTokenError`.
{
"name": "check_logout_claims",
"description": "The checks on a logout token whose signature and expiry already verified. Raises\n`LogoutTokenError`.",
"kind": "function",
"signature": "(claims: 'Mapping[str, Any]', client_ids: 'list[str]', now: 'float', max_age_seconds: 'float', skew_seconds: 'float') -> 'LogoutToken'",
"definedIn": "beyondigital_auth.logout.check_logout_claims",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 132
}
}form_urlencodefunction
application/x-www-form-urlencoded for one value (a space is `+`, `~` is escaped, `*` is not).
{
"name": "form_urlencode",
"description": "application/x-www-form-urlencoded for one value (a space is `+`, `~` is escaped, `*` is\nnot).",
"kind": "function",
"signature": "(value: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.form_urlencode",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 92
}
}is_finite_numberfunction
{
"name": "is_finite_number",
"description": "",
"kind": "function",
"signature": "(value: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.logout.is_finite_number",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 115
}
}is_logout_typfunction
{
"name": "is_logout_typ",
"description": "",
"kind": "function",
"signature": "(typ: 'object') -> 'bool'",
"definedIn": "beyondigital_auth.logout.is_logout_typ",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 104
}
}normalise_client_idsfunction
{
"name": "normalise_client_ids",
"description": "",
"kind": "function",
"signature": "(client_id: 'object') -> 'list[str]'",
"definedIn": "beyondigital_auth.logout.normalise_client_ids",
"source": {
"file": "src/beyondigital_auth/logout.py",
"line": 124
}
}origin_offunction
`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).
{
"name": "origin_of",
"description": "`scheme://host[:port]`, lower-cased, default port dropped (ValueError if not http(s)).",
"kind": "function",
"signature": "(url: 'str') -> 'str'",
"definedIn": "beyondigital_auth._url.origin_of",
"source": {
"file": "src/beyondigital_auth/_url.py",
"line": 49
}
}beyondigital_auth.middleware
AsyncMultiIssuerVerifierclass
Verify RS256 access tokens from an explicit allow-list of issuers. `verify()` is the production surface: RFC 9068 `at+jwt` typ by default, the issuer allow-list + audience pins, and one bounded JWKS refresh on a kid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching auth_service's `decode_with_policy` semantics exactly.
{
"name": "AsyncMultiIssuerVerifier",
"description": "Verify RS256 access tokens from an explicit allow-list of issuers.\n\n`verify()` is the production surface: RFC 9068 `at+jwt` typ by default,\nthe issuer allow-list + audience pins, and one bounded JWKS refresh on a\nkid miss. `verify_claims()` takes an explicit `ValidationPolicy` matching\nauth_service's `decode_with_policy` semantics exactly.",
"kind": "class",
"signature": "(issuers: 'list[str | IssuerConfig]', audience: 'str | list[str]', jwks_cache_ttl_sec: 'int' = 300, clock_skew_sec: 'int' = 0, http_client: 'httpx.AsyncClient | None' = None, require_at_jwt: 'bool' = True, min_jwks_fetch_interval_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "issuers",
"kind": "property",
"signature": "(self) -> 'list[str]'",
"description": "The normalised issuer allow-list, in configuration order."
},
{
"name": "set_issuer_jwks_uri",
"kind": "method",
"signature": "(self, issuer_url: 'str', uri: 'str') -> 'None'",
"description": "Set/override one issuer's JWKS URI after discovery. The issuer must\nbe allow-listed; its cache is dropped."
},
{
"name": "verify",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str | list[str] | None' = None, issuer: 'str | None' = None) -> 'CurrentUser'",
"description": "Verify an access token and return the CurrentUser (with the\nverified `issuer`). `issuer` may only narrow to one allow-listed issuer."
},
{
"name": "verify_claims",
"kind": "async method",
"signature": "(self, token: 'str', policy: 'ValidationPolicy') -> 'dict'",
"description": "Verify `token` against `policy`: JOSE typ (when the purpose\ncarries `at+jwt`), issuer allow-list (before any fetch), kid-pinned\nsignature with the key's own algorithm + expiry, then the claim\ncontract (type, required claims, iss/aud allow-lists)."
},
{
"name": "verify_logout_token",
"kind": "async method",
"signature": "(self, token: 'str', client_id: 'str | list[str]', now: 'float | None' = None, max_age_seconds: 'float | None' = None, consume_jti: 'ConsumeJti | None' = None) -> 'LogoutToken'",
"description": "Verify an OpenID Connect Back-Channel Logout token (the `logout_token` the service POSTs\nto a client'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\npass as one); `iss` is on the issuer allow-list (before any JWKS request); the signature\nverifies under the key the issuer publishes for the token's `kid`, with the algorithm\nthe key dictates, and the token has not expired; `aud` names this client; `iat`, `exp`\nand `jti` are present and `iat` is recent; `events` has the back-channel logout member\nas an object; there is no `nonce`; and `sub`, `sid` or both are present. Anything else\nraises `LogoutTokenError` with a `reason` and a fixed message.\n\n`consume_jti(jti, expires_at)` is optional replay protection, called once after every\nother check passed; return False when that `jti` was seen before. The service re-sends a\ndelivery with the same `jti` until it gets a 2xx, so record the `jti` only once you have\nended the session, or a retry after your own failure will be refused as a replay.\n\nAnswer 200 (or 204) to the service only after this returns and you have ended the\nsession; answer 400 for a `LogoutTokenError`. A failure fetching the JWKS surfaces as\n`NetworkError`: answer 5xx so the service retries."
}
],
"definedIn": "beyondigital_auth.jwt.AsyncMultiIssuerVerifier",
"source": {
"file": "src/beyondigital_auth/jwt.py",
"line": 201
}
}AuthMiddlewareclass
Verify Bearer tokens via JWKS. Public paths are optional (decoded best-effort). Usage: from beyondigital_auth import create_verifier from beyondigital_auth.middleware import AuthMiddleware verifier = create_verifier(issuer_url="https://auth.beyondigital.in", audience="https://api.myapp.com") app.add_middleware(AuthMiddleware, verifier=verifier, public_paths=["/health"])
{
"name": "AuthMiddleware",
"description": "Verify Bearer tokens via JWKS. Public paths are optional (decoded best-effort).\n\nUsage:\n from beyondigital_auth import create_verifier\n from beyondigital_auth.middleware import AuthMiddleware\n verifier = create_verifier(issuer_url=\"https://auth.beyondigital.in\", audience=\"https://api.myapp.com\")\n app.add_middleware(AuthMiddleware, verifier=verifier, public_paths=[\"/health\"])",
"kind": "class",
"signature": "(app, verifier: 'AsyncMultiIssuerVerifier', public_paths: 'list[str] | None' = None) -> 'None'",
"members": [
{
"name": "dispatch",
"kind": "async method",
"signature": "(self, request: 'Request', call_next: 'RequestResponseEndpoint') -> 'Response'",
"description": ""
}
],
"definedIn": "beyondigital_auth.middleware.AuthMiddleware",
"source": {
"file": "src/beyondigital_auth/middleware.py",
"line": 26
}
}CurrentUserclass
Verified identity from an access token (mirrors shared/auth/schemas.py).
{
"name": "CurrentUser",
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"kind": "class",
"signature": "(*, id: str, email: str = '', scopes: list[str] = <factory>, is_active: bool = True, firm_id: str | None = None, auth_user_id: str | None = None, session_id: str | None = None, app: str | None = None, token_version: int = 0, permissions_version: int = 0, is_system_admin: bool = False, identity_class: str | None = None, issuer: str | None = None) -> None",
"members": [
{
"name": "central_identity_id",
"kind": "property",
"signature": "(self) -> 'str'",
"description": ""
},
{
"name": "has_scope",
"kind": "method",
"signature": "(self, scope: 'str') -> 'bool'",
"description": ""
},
{
"name": "is_admin",
"kind": "method",
"signature": "(self) -> 'bool'",
"description": ""
}
],
"jsonSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"serializationSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CurrentUser",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 115
}
}make_auth_dependencyfunction
FastAPI dependency: `current_user: CurrentUser = Depends(get_current_user)`.
{
"name": "make_auth_dependency",
"description": "FastAPI dependency: `current_user: CurrentUser = Depends(get_current_user)`.",
"kind": "function",
"signature": "(verifier: 'AsyncMultiIssuerVerifier') -> 'Callable[[Request], Awaitable[CurrentUser]]'",
"definedIn": "beyondigital_auth.middleware.make_auth_dependency",
"source": {
"file": "src/beyondigital_auth/middleware.py",
"line": 79
}
}require_scopefunction
Dependency factory: `Depends(require_scope("documents:read", verifier))`.
{
"name": "require_scope",
"description": "Dependency factory: `Depends(require_scope(\"documents:read\", verifier))`.",
"kind": "function",
"signature": "(scope: 'str', verifier: 'AsyncMultiIssuerVerifier') -> 'Callable'",
"definedIn": "beyondigital_auth.middleware.require_scope",
"source": {
"file": "src/beyondigital_auth/middleware.py",
"line": 107
}
}beyondigital_auth.otp
AsyncAuthClientclass
Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR. Also: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs, `private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).
{
"name": "AsyncAuthClient",
"description": "Async client for discovery + OAuth flows + userinfo/introspect/revoke/DCR.\n\nAlso: the device flow, token exchange, pushed authorization requests, RP-initiated logout URLs,\n`private_key_jwt` client authentication (`client_assertion_key`) and DPoP (`dpop`).",
"kind": "class",
"signature": "(issuer_url: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, redirect_uri: 'str | None' = None, scopes: 'list[str] | None' = None, http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0, token_endpoint_auth_method: \"Literal['none', 'client_secret_basic', 'client_secret_post', 'private_key_jwt'] | None\" = None, client_assertion_key: 'ClientAssertionKey | None' = None, dpop: 'DpopKey | None' = None) -> 'None'",
"members": [
{
"name": "client_credentials",
"kind": "async method",
"signature": "(self, resource: 'str | list[str]', scope: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "create_authorization_url",
"kind": "method",
"signature": "(self, code_challenge: 'str', code_challenge_method: 'str' = 'S256', scope: 'str | None' = None, state: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, client_id: 'str | None' = None) -> 'str'",
"description": ""
},
{
"name": "create_authorization_url_from_request_uri",
"kind": "method",
"signature": "(self, request_uri: 'str') -> 'str'",
"description": "The authorize URL for a pushed request: `client_id` and `request_uri` only."
},
{
"name": "create_end_session_url",
"kind": "method",
"signature": "(self, id_token_hint: 'str | None' = None, post_logout_redirect_uri: 'str | None' = None, state: 'str | None' = None) -> 'str'",
"description": "The URL to send the person's browser to in order to end their session.\n\nUses the discovered `end_session_endpoint` when it is on the issuer's origin,\n`<issuer>/oauth/end_session` otherwise. The service redirects to `post_logout_redirect_uri`\nonly for an `id_token_hint` that names a client for which that URI is registered."
},
{
"name": "device_login",
"kind": "async method",
"signature": "(self, on_user_code: 'Callable[[DeviceAuthorization], Awaitable[None] | None]', scope: 'str | None' = None, resource: 'str | list[str] | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "`start_device_authorization`, hand the codes to `on_user_code`, then\n`poll_device_token`."
},
{
"name": "discover",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "discover_oauth",
"kind": "async method",
"signature": "(self) -> 'OidcMetadata'",
"description": ""
},
{
"name": "dpop_headers",
"kind": "method",
"signature": "(self, access_token: 'str', method: 'str', url: 'str') -> 'dict[str, str]'",
"description": "The `Authorization: DPoP <token>` and `DPoP: <proof>` headers for a request to any\nresource server, with the proof bound to the token (`ath`), the method and the URL\n(query and fragment excluded). Needs the `dpop` key. Call once per request: a proof is\nsingle use."
},
{
"name": "exchange_code",
"kind": "async method",
"signature": "(self, code: 'str', code_verifier: 'str', redirect_uri: 'str | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "exchange_token",
"kind": "async method",
"signature": "(self, subject_token: 'str', subject_token_type: 'str | None' = None, actor_token: 'str | None' = None, actor_token_type: 'str | None' = None, requested_token_type: 'str | None' = None, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'TokenResponse'",
"description": "Exchange an access token for a delegated one (the service's delegation grants decide\nwhether it may).\n\n`subject_token` is the delegator's access token; `actor_token` the acting party's. The\ntoken types default to the only one the service supports. Never carries a DPoP proof: the\nservice accepts one for the code and refresh grants only."
},
{
"name": "health",
"kind": "async method",
"signature": "(self) -> 'dict'",
"description": ""
},
{
"name": "introspect",
"kind": "async method",
"signature": "(self, token: 'str', audience: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'IntrospectionResponse'",
"description": ""
},
{
"name": "jwks",
"kind": "async method",
"signature": "(self) -> 'JwksResponse'",
"description": ""
},
{
"name": "poll_device_token",
"kind": "async method",
"signature": "(self, device: 'DeviceAuthorization', client_id: 'str | None' = None, client_secret: 'str | None' = None, sleep: 'Callable[[float], Awaitable[None]] | None' = None, now: 'Callable[[], float] | None' = None, cancel: 'asyncio.Event | None' = None) -> 'TokenResponse'",
"description": "Poll the token endpoint until the person approves.\n\nWaits the interval before each poll, adds five seconds after `slow_down`, and stops with\nthe service's `OAuthError` for `access_denied`, `expired_token` or anything else (and with\n`expired_token` once the device code's own lifetime would pass). Set the `cancel` event to\nstop (`DeviceFlowCancelled`). A network failure is raised as `NetworkError`, not retried;\ncall again with the same authorization to resume."
},
{
"name": "push_authorization_request",
"kind": "async method",
"signature": "(self, code_challenge: 'str', state: 'str | None' = None, scope: 'str | None' = None, nonce: 'str | None' = None, resource: 'str | list[str] | None' = None, redirect_uri: 'str | None' = None, extra: 'Mapping[str, str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'PushedAuthorization'",
"description": "Send the authorize parameters to the service directly and get a one-use `request_uri`\nback, so the browser carries nothing the person could read or edit.\n\nAuthenticates like the token endpoint. Then redirect to\n`create_authorization_url_from_request_uri(result.request_uri)`."
},
{
"name": "refresh",
"kind": "async method",
"signature": "(self, refresh_token: 'str', client_id: 'str | None' = None, client_secret: 'str | None' = None, resource: 'str | list[str] | None' = None) -> 'TokenResponse'",
"description": ""
},
{
"name": "register",
"kind": "async method",
"signature": "(self, redirect_uris: 'list[str]', client_name: 'str | None' = None, scope: 'str | None' = None, grant_types: 'list[str] | None' = None, response_types: 'list[str] | None' = None, token_endpoint_auth_method: 'str' = 'none', client_uri: 'str | None' = None, logo_uri: 'str | None' = None, application_type: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "revoke",
"kind": "async method",
"signature": "(self, token: 'str') -> 'None'",
"description": ""
},
{
"name": "start_device_authorization",
"kind": "async method",
"signature": "(self, scope: 'str | None' = None, resource: 'str | list[str] | None' = None, client_id: 'str | None' = None, client_secret: 'str | None' = None) -> 'DeviceAuthorization'",
"description": "Ask for a device code and a user code.\n\nShow `user_code` and `verification_uri` (or `verification_uri_complete`, for a QR code) to\nthe person, then call `poll_device_token`. The client must be registered for the\ndevice_code grant; a confidential client authenticates with its secret (`private_key_jwt`\nis not accepted at this endpoint by the service)."
},
{
"name": "userinfo",
"kind": "async method",
"signature": "(self, access_token: 'str', token_type: \"Literal['Bearer', 'DPoP']\" = 'Bearer') -> 'UserInfoResponse'",
"description": "`token_type=\"DPoP\"` for a token issued with a DPoP proof: sent under the DPoP scheme\nwith a proof bound to it."
}
],
"definedIn": "beyondigital_auth.client.AsyncAuthClient",
"source": {
"file": "src/beyondigital_auth/client.py",
"line": 93
}
}AsyncOtpClientclass
{
"name": "AsyncOtpClient",
"description": "",
"kind": "class",
"signature": "(issuer_url: 'str', http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0, api_key: 'str | None' = None) -> 'None'",
"members": [
{
"name": "cancel_server_otp_session",
"kind": "async method",
"signature": "(self, app: 'str', *, client_id: 'str', environment_id: 'str', nonce: 'str') -> 'OtpSessionCancellation'",
"description": "Use the original otp:verify API key; persist/retry uncertain BFF cancellations.\n\nNo automatic retry, contact/channel transfer, or credential recovery occurs."
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "password_login",
"kind": "async method",
"signature": "(self, email: 'str', password: 'str', app: 'str' = 'admin', client_id: 'str' = 'admin-panel') -> 'LoginResponse'",
"description": ""
},
{
"name": "refresh_token",
"kind": "async method",
"signature": "(self, refresh_token: 'str', client_id: 'str' = 'mobile-app', *, resource: 'str | list[str] | None' = None) -> 'dict'",
"description": "Rotate through the strict OAuth endpoint, preserving the resource pin."
},
{
"name": "send_email_verify_otp",
"kind": "async method",
"signature": "(self, email: 'str', client_id: 'str', access_token: 'str', app: 'str' = 'shared_auth') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_login_otp",
"kind": "async method",
"signature": "(self, phone: 'str', client_id: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_register_otp",
"kind": "async method",
"signature": "(self, phone: 'str', full_name: 'str', client_id: 'str', app: 'str' = 'shared_auth') -> 'OtpSendResponse'",
"description": ""
},
{
"name": "send_server_otp",
"kind": "async method",
"signature": "(self, recipient: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms', *, mode: \"Literal['verification_only', 'session']\" = 'verification_only', client_id: 'str | None' = None, environment_id: 'str | None' = None, nonce: 'str | None' = None) -> 'OtpSendResponse'",
"description": ""
},
{
"name": "verify_email_verify_otp",
"kind": "async method",
"signature": "(self, email: 'str', otp: 'str', client_id: 'str', access_token: 'str', app: 'str' = 'shared_auth') -> 'dict'",
"description": ""
},
{
"name": "verify_login_otp",
"kind": "async method",
"signature": "(self, phone: 'str', otp: 'str', client_id: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms') -> 'LoginResponse'",
"description": ""
},
{
"name": "verify_register_otp",
"kind": "async method",
"signature": "(self, phone: 'str', otp: 'str', full_name: 'str', client_id: 'str', app: 'str' = 'shared_auth') -> 'LoginResponse'",
"description": ""
},
{
"name": "verify_server_otp",
"kind": "async method",
"signature": "(self, recipient: 'str', otp: 'str', app: 'str' = 'shared_auth', channel: 'str' = 'sms', *, mode: \"Literal['verification_only', 'session']\" = 'verification_only', client_id: 'str | None' = None, environment_id: 'str | None' = None, nonce: 'str | None' = None) -> 'OtpVerificationResponse'",
"description": ""
}
],
"definedIn": "beyondigital_auth.otp.AsyncOtpClient",
"source": {
"file": "src/beyondigital_auth/otp.py",
"line": 33
}
}LoginResponseclass
{
"name": "LoginResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.LoginResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 97
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}OtpIdentityResponseclass
{
"name": "OtpIdentityResponse",
"description": "",
"kind": "class",
"signature": "(*, verified: bool, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpIdentityResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 101
}
}OtpSendResponseclass
{
"name": "OtpSendResponse",
"description": "",
"kind": "class",
"signature": "(*, status: str, phone: str | None = None, email: str | None = None, expires_in: int = 300, resend_available_in: int = 0, delivery_channel: str = 'sms') -> None",
"members": [],
"jsonSchema": {
"properties": {
"status": {
"title": "Status",
"type": "string"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"expires_in": {
"default": 300,
"title": "Expires In",
"type": "integer"
},
"resend_available_in": {
"default": 0,
"title": "Resend Available In",
"type": "integer"
},
"delivery_channel": {
"default": "sms",
"title": "Delivery Channel",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSendResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"status": {
"title": "Status",
"type": "string"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"expires_in": {
"default": 300,
"title": "Expires In",
"type": "integer"
},
"resend_available_in": {
"default": 0,
"title": "Resend Available In",
"type": "integer"
},
"delivery_channel": {
"default": "sms",
"title": "Delivery Channel",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSendResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpSendResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 80
}
}OtpSessionCancellationclass
Acknowledgement only; no recovered credentials or session tokens.
{
"name": "OtpSessionCancellation",
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"kind": "class",
"signature": "(*, status: Literal['cancelled']) -> None",
"members": [],
"jsonSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"serializationSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpSessionCancellation",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 109
}
}beyondigital_auth.policy
JwtErrorclass
JWT validation failure.
{
"name": "JwtError",
"description": "JWT validation failure.",
"kind": "class",
"signature": "(message: 'str', code: 'str' = 'invalid') -> 'None'",
"members": [],
"definedIn": "beyondigital_auth.errors.JwtError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 23
}
}TokenPurposeclass
{
"name": "TokenPurpose",
"description": "",
"kind": "class",
"signature": "(*values)",
"members": [],
"definedIn": "beyondigital_auth.policy.TokenPurpose",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 27
}
}ValidationPolicyclass
ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)
{
"name": "ValidationPolicy",
"description": "ValidationPolicy(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True)",
"kind": "class",
"signature": "(purpose: 'TokenPurpose', trusted_issuers: 'tuple[str, ...]' = (), expected_audiences: 'tuple[str, ...]' = (), require_at_jwt: 'bool' = True) -> None",
"members": [
{
"name": "access",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "allow_legacy_typ",
"kind": "method",
"signature": "(self) -> 'ValidationPolicy'",
"description": "Compat window for pre-WP-03b access tokens with no `typ` header."
},
{
"name": "id_token",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "internal_assertion",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "refresh",
"kind": "method",
"signature": "() -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_expected_audiences",
"kind": "method",
"signature": "(self, audiences: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
},
{
"name": "with_trusted_issuers",
"kind": "method",
"signature": "(self, issuers: 'list[str] | tuple[str, ...]') -> 'ValidationPolicy'",
"description": ""
}
],
"definedIn": "beyondigital_auth.policy.ValidationPolicy",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 37
}
}is_at_jwt_typfunction
RFC 9068 §2.1: `typ` compares case-insensitively as a media type; `application/at+jwt` is the explicit-registration equivalent.
{
"name": "is_at_jwt_typ",
"description": "RFC 9068 §2.1: `typ` compares case-insensitively as a media type;\n`application/at+jwt` is the explicit-registration equivalent.",
"kind": "function",
"signature": "(typ: 'str | None') -> 'bool'",
"definedIn": "beyondigital_auth.policy.is_at_jwt_typ",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 77
}
}validate_claimsfunction
Bind a verified claim set to its purpose — byte-for-byte port of the service's `validate_claims`.
{
"name": "validate_claims",
"description": "Bind a verified claim set to its purpose — byte-for-byte port of the\nservice's `validate_claims`.",
"kind": "function",
"signature": "(claims: 'dict', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_claims",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 115
}
}validate_typ_headerfunction
{
"name": "validate_typ_header",
"description": "",
"kind": "function",
"signature": "(typ: 'str | None', policy: 'ValidationPolicy') -> 'None'",
"definedIn": "beyondigital_auth.policy.validate_typ_header",
"source": {
"file": "src/beyondigital_auth/policy.py",
"line": 86
}
}beyondigital_auth.saas
Accountclass
{
"name": "Account",
"description": "",
"kind": "class",
"signature": "(*, id: str, name: str, status: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"required": [
"id",
"name"
],
"title": "Account",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"required": [
"id",
"name"
],
"title": "Account",
"type": "object"
},
"definedIn": "beyondigital_auth.types.Account",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 182
}
}Applicationclass
{
"name": "Application",
"description": "",
"kind": "class",
"signature": "(*, id: str, account_id: str | None = None, name: str, slug: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Account Id"
},
"name": {
"title": "Name",
"type": "string"
},
"slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Slug"
}
},
"required": [
"id",
"name"
],
"title": "Application",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Account Id"
},
"name": {
"title": "Name",
"type": "string"
},
"slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Slug"
}
},
"required": [
"id",
"name"
],
"title": "Application",
"type": "object"
},
"definedIn": "beyondigital_auth.types.Application",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 188
}
}AsyncSaasClientclass
{
"name": "AsyncSaasClient",
"description": "",
"kind": "class",
"signature": "(issuer_url: 'str', http_client: 'httpx.AsyncClient | None' = None, timeout_sec: 'float' = 10.0) -> 'None'",
"members": [
{
"name": "accept_team_invitation",
"kind": "async method",
"signature": "(self, access_token: 'str', token: 'str') -> 'dict'",
"description": ""
},
{
"name": "change_member_role",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', user_id: 'str', role: 'str', *, proof_id: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "close",
"kind": "async method",
"signature": "(self) -> 'None'",
"description": ""
},
{
"name": "create_account",
"kind": "async method",
"signature": "(self, access_token: 'str', name: 'str', slug: 'str', billing_email: 'str | None' = None) -> 'Account'",
"description": ""
},
{
"name": "create_application",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', name: 'str', slug: 'str') -> 'Application'",
"description": ""
},
{
"name": "create_checkout",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', token_pack_price_id: 'str', idempotency_key: 'str', *, proof_id: 'str | None' = None) -> 'CheckoutResult'",
"description": ""
},
{
"name": "create_public_client",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str', name: 'str', redirect_uris: 'list[str]', allowed_scopes: 'list[str] | None' = None, *, client_id: 'str', issuer: 'str', application_type: 'str', allowed_resources: 'list[str] | None' = None, directory_id: 'str | None' = None, otp_backend_only: 'bool' = False) -> 'PublicClient'",
"description": ""
},
{
"name": "create_team_invitation",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', email: 'str', role: 'str', expires_in_hours: 'int | None' = None, *, proof_id: 'str | None' = None) -> 'dict'",
"description": ""
},
{
"name": "get_catalog",
"kind": "async method",
"signature": "(self, market: 'str', currency: 'str | None' = None, access_token: 'str | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "get_overview",
"kind": "async method",
"signature": "(self, access_token: 'str') -> 'dict'",
"description": ""
},
{
"name": "get_wallet",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'dict'",
"description": ""
},
{
"name": "list_accounts",
"kind": "async method",
"signature": "(self, access_token: 'str') -> 'list[Account]'",
"description": ""
},
{
"name": "list_applications",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[Application]'",
"description": ""
},
{
"name": "list_public_clients",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str') -> 'list[PublicClient]'",
"description": ""
},
{
"name": "list_purchases",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', limit: 'int | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "list_resources",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', after: 'str | None' = None) -> 'list[ResourceRegistration]'",
"description": "One page of at most 100 records; after is the last raw registration UUID."
},
{
"name": "list_team_invitations",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[dict]'",
"description": ""
},
{
"name": "list_team_members",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str') -> 'list[dict]'",
"description": ""
},
{
"name": "list_usage",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', limit: 'int | None' = None) -> 'list[dict]'",
"description": ""
},
{
"name": "propose_resource",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', proposal: 'ResourceProposal') -> 'ResourceRegistration'",
"description": "Submit for operator review; never approves or proves domain ownership."
},
{
"name": "reconcile_checkout_return",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', purchase_id: 'str') -> 'ReconcileResult'",
"description": ""
},
{
"name": "remove_team_member",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', user_id: 'str', *, proof_id: 'str | None' = None) -> 'None'",
"description": ""
},
{
"name": "update_application",
"kind": "async method",
"signature": "(self, access_token: 'str', account_id: 'str', application_id: 'str', name: 'str | None' = None, slug: 'str | None' = None) -> 'Application'",
"description": ""
}
],
"definedIn": "beyondigital_auth.saas.AsyncSaasClient",
"source": {
"file": "src/beyondigital_auth/saas.py",
"line": 32
}
}CheckoutResultclass
{
"name": "CheckoutResult",
"description": "",
"kind": "class",
"signature": "(*, purchase_id: str, payment_id: str, checkout_url: str | None = None, **extra_data: Any) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"title": "Payment Id",
"type": "string"
},
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Checkout Url"
}
},
"required": [
"purchase_id",
"payment_id"
],
"title": "CheckoutResult",
"type": "object"
},
"serializationSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"title": "Payment Id",
"type": "string"
},
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Checkout Url"
}
},
"required": [
"purchase_id",
"payment_id"
],
"title": "CheckoutResult",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CheckoutResult",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 210
}
}OAuthErrorclass
RFC 6749 §5.2 error from the authorization server.
{
"name": "OAuthError",
"description": "RFC 6749 §5.2 error from the authorization server.",
"kind": "class",
"signature": "(error: 'str', error_description: 'str' = '', status: 'int' = 400) -> 'None'",
"members": [
{
"name": "to_dict",
"kind": "method",
"signature": "(self) -> 'dict'",
"description": ""
}
],
"definedIn": "beyondigital_auth.errors.OAuthError",
"source": {
"file": "src/beyondigital_auth/errors.py",
"line": 6
}
}PublicClientclass
{
"name": "PublicClient",
"description": "",
"kind": "class",
"signature": "(*, environment_id: str | None = None, directory_id: str | None = None, otp_backend_only: bool = False, name: str | None = None, issuer: str | None = None, allowed_scopes: list[str] = <factory>, allowed_resources: list[str] = <factory>, token_endpoint_auth_method: str = 'none', client_id: str, client_name: str | None = None, application_id: str | None = None, redirect_uris: list[str] = <factory>) -> None",
"members": [],
"jsonSchema": {
"properties": {
"environment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Environment Id"
},
"directory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory Id"
},
"otp_backend_only": {
"default": false,
"title": "Otp Backend Only",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
},
"allowed_scopes": {
"items": {
"type": "string"
},
"title": "Allowed Scopes",
"type": "array"
},
"allowed_resources": {
"items": {
"type": "string"
},
"title": "Allowed Resources",
"type": "array"
},
"token_endpoint_auth_method": {
"default": "none",
"title": "Token Endpoint Auth Method",
"type": "string"
},
"client_id": {
"title": "Client Id",
"type": "string"
},
"client_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Name"
},
"application_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Application Id"
},
"redirect_uris": {
"items": {
"type": "string"
},
"title": "Redirect Uris",
"type": "array"
}
},
"required": [
"client_id"
],
"title": "PublicClient",
"type": "object"
},
"serializationSchema": {
"properties": {
"environment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Environment Id"
},
"directory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory Id"
},
"otp_backend_only": {
"default": false,
"title": "Otp Backend Only",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
},
"allowed_scopes": {
"items": {
"type": "string"
},
"title": "Allowed Scopes",
"type": "array"
},
"allowed_resources": {
"items": {
"type": "string"
},
"title": "Allowed Resources",
"type": "array"
},
"token_endpoint_auth_method": {
"default": "none",
"title": "Token Endpoint Auth Method",
"type": "string"
},
"client_id": {
"title": "Client Id",
"type": "string"
},
"client_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Name"
},
"application_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Application Id"
},
"redirect_uris": {
"items": {
"type": "string"
},
"title": "Redirect Uris",
"type": "array"
}
},
"required": [
"client_id"
],
"title": "PublicClient",
"type": "object"
},
"definedIn": "beyondigital_auth.types.PublicClient",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 195
}
}ReconcileResultclass
{
"name": "ReconcileResult",
"description": "",
"kind": "class",
"signature": "(*, purchase_id: str, payment_id: str | None = None, status: str | None = None, reconciliation_required: bool | None = None, **extra_data: Any) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Payment Id"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"reconciliation_required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Reconciliation Required"
}
},
"required": [
"purchase_id"
],
"title": "ReconcileResult",
"type": "object"
},
"serializationSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Payment Id"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"reconciliation_required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Reconciliation Required"
}
},
"required": [
"purchase_id"
],
"title": "ReconcileResult",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ReconcileResult",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 218
}
}ResourceProposalclass
An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.
{
"name": "ResourceProposal",
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"kind": "class",
"signature": "(*, directory_id: str, resource_uri: str, proposed_scopes: list[str]) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"serializationSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceProposal",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 156
}
}ResourceRegistrationclass
{
"name": "ResourceRegistration",
"description": "",
"kind": "class",
"signature": "(*, id: str, account_id: str, environment_id: str, directory_id: str, resource_uri: str, proposed_scopes: list[str], approved_scopes: list[str], status: Literal['pending', 'approved', 'suspended', 'rejected'], public_clients: bool, proposed_by_user_id: str, reviewed_by_user_id: str | None, reviewed_at: str | None, created_at: str, updated_at: str) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceRegistration",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 165
}
}beyondigital_auth.types
Accountclass
{
"name": "Account",
"description": "",
"kind": "class",
"signature": "(*, id: str, name: str, status: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"required": [
"id",
"name"
],
"title": "Account",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"required": [
"id",
"name"
],
"title": "Account",
"type": "object"
},
"definedIn": "beyondigital_auth.types.Account",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 182
}
}Applicationclass
{
"name": "Application",
"description": "",
"kind": "class",
"signature": "(*, id: str, account_id: str | None = None, name: str, slug: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Account Id"
},
"name": {
"title": "Name",
"type": "string"
},
"slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Slug"
}
},
"required": [
"id",
"name"
],
"title": "Application",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Account Id"
},
"name": {
"title": "Name",
"type": "string"
},
"slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Slug"
}
},
"required": [
"id",
"name"
],
"title": "Application",
"type": "object"
},
"definedIn": "beyondigital_auth.types.Application",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 188
}
}AuthenticatedUserclass
{
"name": "AuthenticatedUser",
"description": "",
"kind": "class",
"signature": "(*, id: str, auth_user_id: str, email: str | None = None, phone: str | None = None, full_name: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
},
"definedIn": "beyondigital_auth.types.AuthenticatedUser",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 89
}
}CheckoutResultclass
{
"name": "CheckoutResult",
"description": "",
"kind": "class",
"signature": "(*, purchase_id: str, payment_id: str, checkout_url: str | None = None, **extra_data: Any) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"title": "Payment Id",
"type": "string"
},
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Checkout Url"
}
},
"required": [
"purchase_id",
"payment_id"
],
"title": "CheckoutResult",
"type": "object"
},
"serializationSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"title": "Payment Id",
"type": "string"
},
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Checkout Url"
}
},
"required": [
"purchase_id",
"payment_id"
],
"title": "CheckoutResult",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CheckoutResult",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 210
}
}CurrentUserclass
Verified identity from an access token (mirrors shared/auth/schemas.py).
{
"name": "CurrentUser",
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"kind": "class",
"signature": "(*, id: str, email: str = '', scopes: list[str] = <factory>, is_active: bool = True, firm_id: str | None = None, auth_user_id: str | None = None, session_id: str | None = None, app: str | None = None, token_version: int = 0, permissions_version: int = 0, is_system_admin: bool = False, identity_class: str | None = None, issuer: str | None = None) -> None",
"members": [
{
"name": "central_identity_id",
"kind": "property",
"signature": "(self) -> 'str'",
"description": ""
},
{
"name": "has_scope",
"kind": "method",
"signature": "(self, scope: 'str') -> 'bool'",
"description": ""
},
{
"name": "is_admin",
"kind": "method",
"signature": "(self) -> 'bool'",
"description": ""
}
],
"jsonSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"serializationSchema": {
"description": "Verified identity from an access token (mirrors shared/auth/schemas.py).",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"email": {
"default": "",
"title": "Email",
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
},
"is_active": {
"default": true,
"title": "Is Active",
"type": "boolean"
},
"firm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Firm Id"
},
"auth_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Auth User Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"app": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "App"
},
"token_version": {
"default": 0,
"title": "Token Version",
"type": "integer"
},
"permissions_version": {
"default": 0,
"title": "Permissions Version",
"type": "integer"
},
"is_system_admin": {
"default": false,
"title": "Is System Admin",
"type": "boolean"
},
"identity_class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Identity Class"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
}
},
"required": [
"id"
],
"title": "CurrentUser",
"type": "object"
},
"definedIn": "beyondigital_auth.types.CurrentUser",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 115
}
}IntrospectionResponseclass
{
"name": "IntrospectionResponse",
"description": "",
"kind": "class",
"signature": "(*, active: bool, iss: str | None = None, aud: typing.Any | None = None, scope: str | None = None, scopes: list[str] | None = None, client_id: str | None = None, sub: str | None = None, exp: int | None = None, central_user_id: str | None = None, is_system_admin: bool | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"active": {
"title": "Active",
"type": "boolean"
},
"iss": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Iss"
},
"aud": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Aud"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"scopes": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Scopes"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Id"
},
"sub": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub"
},
"exp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Exp"
},
"central_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Central User Id"
},
"is_system_admin": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is System Admin"
}
},
"required": [
"active"
],
"title": "IntrospectionResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.IntrospectionResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 60
}
}Jwkclass
{
"name": "Jwk",
"description": "",
"kind": "class",
"signature": "(*, kty: Literal['RSA'] = 'RSA', use: Literal['sig'] = 'sig', alg: Literal['RS256'] = 'RS256', kid: str, n: str, e: str) -> None",
"members": [],
"jsonSchema": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
},
"serializationSchema": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
},
"definedIn": "beyondigital_auth.types.Jwk",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 34
}
}JwksResponseclass
{
"name": "JwksResponse",
"description": "",
"kind": "class",
"signature": "(*, keys: list[beyondigital_auth.types.Jwk]) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"Jwk": {
"properties": {
"kty": {
"const": "RSA",
"default": "RSA",
"title": "Kty",
"type": "string"
},
"use": {
"const": "sig",
"default": "sig",
"title": "Use",
"type": "string"
},
"alg": {
"const": "RS256",
"default": "RS256",
"title": "Alg",
"type": "string"
},
"kid": {
"title": "Kid",
"type": "string"
},
"n": {
"title": "N",
"type": "string"
},
"e": {
"title": "E",
"type": "string"
}
},
"required": [
"kid",
"n",
"e"
],
"title": "Jwk",
"type": "object"
}
},
"properties": {
"keys": {
"items": {
"$ref": "#/$defs/Jwk"
},
"title": "Keys",
"type": "array"
}
},
"required": [
"keys"
],
"title": "JwksResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.JwksResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 43
}
}LoginResponseclass
{
"name": "LoginResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"access_token",
"expires_in",
"user"
],
"title": "LoginResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.LoginResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 97
}
}OidcMetadataclass
{
"name": "OidcMetadata",
"description": "",
"kind": "class",
"signature": "(*, issuer: str, authorization_endpoint: str, token_endpoint: str, userinfo_endpoint: str, registration_endpoint: str, jwks_uri: str, revocation_endpoint: str, introspection_endpoint: str, scopes_supported: list[str] = <factory>, response_types_supported: list[str] = <factory>, grant_types_supported: list[str] = <factory>, end_session_endpoint: str | None = None, device_authorization_endpoint: str | None = None, pushed_authorization_request_endpoint: str | None = None, require_pushed_authorization_requests: bool | None = None, dpop_signing_alg_values_supported: list[str] | None = None, token_endpoint_auth_signing_alg_values_supported: list[str] | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"serializationSchema": {
"properties": {
"issuer": {
"title": "Issuer",
"type": "string"
},
"authorization_endpoint": {
"title": "Authorization Endpoint",
"type": "string"
},
"token_endpoint": {
"title": "Token Endpoint",
"type": "string"
},
"userinfo_endpoint": {
"title": "Userinfo Endpoint",
"type": "string"
},
"registration_endpoint": {
"title": "Registration Endpoint",
"type": "string"
},
"jwks_uri": {
"title": "Jwks Uri",
"type": "string"
},
"revocation_endpoint": {
"title": "Revocation Endpoint",
"type": "string"
},
"introspection_endpoint": {
"title": "Introspection Endpoint",
"type": "string"
},
"scopes_supported": {
"items": {
"type": "string"
},
"title": "Scopes Supported",
"type": "array"
},
"response_types_supported": {
"items": {
"type": "string"
},
"title": "Response Types Supported",
"type": "array"
},
"grant_types_supported": {
"items": {
"type": "string"
},
"title": "Grant Types Supported",
"type": "array"
},
"end_session_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Session Endpoint"
},
"device_authorization_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device Authorization Endpoint"
},
"pushed_authorization_request_endpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pushed Authorization Request Endpoint"
},
"require_pushed_authorization_requests": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Pushed Authorization Requests"
},
"dpop_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Dpop Signing Alg Values Supported"
},
"token_endpoint_auth_signing_alg_values_supported": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Token Endpoint Auth Signing Alg Values Supported"
}
},
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"userinfo_endpoint",
"registration_endpoint",
"jwks_uri",
"revocation_endpoint",
"introspection_endpoint"
],
"title": "OidcMetadata",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OidcMetadata",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 10
}
}OtpIdentityResponseclass
{
"name": "OtpIdentityResponse",
"description": "",
"kind": "class",
"signature": "(*, verified: bool, user: beyondigital_auth.types.AuthenticatedUser) -> None",
"members": [],
"jsonSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"serializationSchema": {
"$defs": {
"AuthenticatedUser": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"auth_user_id": {
"title": "Auth User Id",
"type": "string"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Full Name"
}
},
"required": [
"id",
"auth_user_id"
],
"title": "AuthenticatedUser",
"type": "object"
}
},
"properties": {
"verified": {
"title": "Verified",
"type": "boolean"
},
"user": {
"$ref": "#/$defs/AuthenticatedUser"
}
},
"required": [
"verified",
"user"
],
"title": "OtpIdentityResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpIdentityResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 101
}
}OtpSendResponseclass
{
"name": "OtpSendResponse",
"description": "",
"kind": "class",
"signature": "(*, status: str, phone: str | None = None, email: str | None = None, expires_in: int = 300, resend_available_in: int = 0, delivery_channel: str = 'sms') -> None",
"members": [],
"jsonSchema": {
"properties": {
"status": {
"title": "Status",
"type": "string"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"expires_in": {
"default": 300,
"title": "Expires In",
"type": "integer"
},
"resend_available_in": {
"default": 0,
"title": "Resend Available In",
"type": "integer"
},
"delivery_channel": {
"default": "sms",
"title": "Delivery Channel",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSendResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"status": {
"title": "Status",
"type": "string"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"expires_in": {
"default": 300,
"title": "Expires In",
"type": "integer"
},
"resend_available_in": {
"default": 0,
"title": "Resend Available In",
"type": "integer"
},
"delivery_channel": {
"default": "sms",
"title": "Delivery Channel",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSendResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpSendResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 80
}
}OtpSessionCancellationclass
Acknowledgement only; no recovered credentials or session tokens.
{
"name": "OtpSessionCancellation",
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"kind": "class",
"signature": "(*, status: Literal['cancelled']) -> None",
"members": [],
"jsonSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"serializationSchema": {
"description": "Acknowledgement only; no recovered credentials or session tokens.",
"properties": {
"status": {
"const": "cancelled",
"title": "Status",
"type": "string"
}
},
"required": [
"status"
],
"title": "OtpSessionCancellation",
"type": "object"
},
"definedIn": "beyondigital_auth.types.OtpSessionCancellation",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 109
}
}PublicClientclass
{
"name": "PublicClient",
"description": "",
"kind": "class",
"signature": "(*, environment_id: str | None = None, directory_id: str | None = None, otp_backend_only: bool = False, name: str | None = None, issuer: str | None = None, allowed_scopes: list[str] = <factory>, allowed_resources: list[str] = <factory>, token_endpoint_auth_method: str = 'none', client_id: str, client_name: str | None = None, application_id: str | None = None, redirect_uris: list[str] = <factory>) -> None",
"members": [],
"jsonSchema": {
"properties": {
"environment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Environment Id"
},
"directory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory Id"
},
"otp_backend_only": {
"default": false,
"title": "Otp Backend Only",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
},
"allowed_scopes": {
"items": {
"type": "string"
},
"title": "Allowed Scopes",
"type": "array"
},
"allowed_resources": {
"items": {
"type": "string"
},
"title": "Allowed Resources",
"type": "array"
},
"token_endpoint_auth_method": {
"default": "none",
"title": "Token Endpoint Auth Method",
"type": "string"
},
"client_id": {
"title": "Client Id",
"type": "string"
},
"client_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Name"
},
"application_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Application Id"
},
"redirect_uris": {
"items": {
"type": "string"
},
"title": "Redirect Uris",
"type": "array"
}
},
"required": [
"client_id"
],
"title": "PublicClient",
"type": "object"
},
"serializationSchema": {
"properties": {
"environment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Environment Id"
},
"directory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory Id"
},
"otp_backend_only": {
"default": false,
"title": "Otp Backend Only",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"issuer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issuer"
},
"allowed_scopes": {
"items": {
"type": "string"
},
"title": "Allowed Scopes",
"type": "array"
},
"allowed_resources": {
"items": {
"type": "string"
},
"title": "Allowed Resources",
"type": "array"
},
"token_endpoint_auth_method": {
"default": "none",
"title": "Token Endpoint Auth Method",
"type": "string"
},
"client_id": {
"title": "Client Id",
"type": "string"
},
"client_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Name"
},
"application_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Application Id"
},
"redirect_uris": {
"items": {
"type": "string"
},
"title": "Redirect Uris",
"type": "array"
}
},
"required": [
"client_id"
],
"title": "PublicClient",
"type": "object"
},
"definedIn": "beyondigital_auth.types.PublicClient",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 195
}
}ReconcileResultclass
{
"name": "ReconcileResult",
"description": "",
"kind": "class",
"signature": "(*, purchase_id: str, payment_id: str | None = None, status: str | None = None, reconciliation_required: bool | None = None, **extra_data: Any) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Payment Id"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"reconciliation_required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Reconciliation Required"
}
},
"required": [
"purchase_id"
],
"title": "ReconcileResult",
"type": "object"
},
"serializationSchema": {
"additionalProperties": true,
"properties": {
"purchase_id": {
"title": "Purchase Id",
"type": "string"
},
"payment_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Payment Id"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"reconciliation_required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Reconciliation Required"
}
},
"required": [
"purchase_id"
],
"title": "ReconcileResult",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ReconcileResult",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 218
}
}ResourceProposalclass
An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.
{
"name": "ResourceProposal",
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"kind": "class",
"signature": "(*, directory_id: str, resource_uri: str, proposed_scopes: list[str]) -> None",
"members": [],
"jsonSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"serializationSchema": {
"additionalProperties": false,
"description": "An inert proposal. Directory UUIDs and opaque directory Node IDs pass unchanged.",
"properties": {
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
}
},
"required": [
"directory_id",
"resource_uri",
"proposed_scopes"
],
"title": "ResourceProposal",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceProposal",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 156
}
}ResourceRegistrationclass
{
"name": "ResourceRegistration",
"description": "",
"kind": "class",
"signature": "(*, id: str, account_id: str, environment_id: str, directory_id: str, resource_uri: str, proposed_scopes: list[str], approved_scopes: list[str], status: Literal['pending', 'approved', 'suspended', 'rejected'], public_clients: bool, proposed_by_user_id: str, reviewed_by_user_id: str | None, reviewed_at: str | None, created_at: str, updated_at: str) -> None",
"members": [],
"jsonSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"serializationSchema": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"account_id": {
"title": "Account Id",
"type": "string"
},
"environment_id": {
"title": "Environment Id",
"type": "string"
},
"directory_id": {
"title": "Directory Id",
"type": "string"
},
"resource_uri": {
"title": "Resource Uri",
"type": "string"
},
"proposed_scopes": {
"items": {
"type": "string"
},
"title": "Proposed Scopes",
"type": "array"
},
"approved_scopes": {
"items": {
"type": "string"
},
"title": "Approved Scopes",
"type": "array"
},
"status": {
"enum": [
"pending",
"approved",
"suspended",
"rejected"
],
"title": "Status",
"type": "string"
},
"public_clients": {
"title": "Public Clients",
"type": "boolean"
},
"proposed_by_user_id": {
"title": "Proposed By User Id",
"type": "string"
},
"reviewed_by_user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed By User Id"
},
"reviewed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reviewed At"
},
"created_at": {
"title": "Created At",
"type": "string"
},
"updated_at": {
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"account_id",
"environment_id",
"directory_id",
"resource_uri",
"proposed_scopes",
"approved_scopes",
"status",
"public_clients",
"proposed_by_user_id",
"reviewed_by_user_id",
"reviewed_at",
"created_at",
"updated_at"
],
"title": "ResourceRegistration",
"type": "object"
},
"definedIn": "beyondigital_auth.types.ResourceRegistration",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 165
}
}ResourceStatustype
{
"name": "ResourceStatus",
"description": "",
"kind": "type",
"type": "typing.Literal['pending', 'approved', 'suspended', 'rejected']"
}TokenResponseclass
{
"name": "TokenResponse",
"description": "",
"kind": "class",
"signature": "(*, access_token: str, token_type: str = 'Bearer', expires_in: int, refresh_token: str | None = None, id_token: str | None = None, scope: str | None = None, session_id: str | None = None, issued_token_type: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"access_token": {
"title": "Access Token",
"type": "string"
},
"token_type": {
"default": "Bearer",
"title": "Token Type",
"type": "string"
},
"expires_in": {
"title": "Expires In",
"type": "integer"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Refresh Token"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Scope"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Session Id"
},
"issued_token_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Issued Token Type"
}
},
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.TokenResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 47
}
}UserInfoResponseclass
{
"name": "UserInfoResponse",
"description": "",
"kind": "class",
"signature": "(*, sub: str, email: str, email_verified: bool, name: str | None = None) -> None",
"members": [],
"jsonSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"serializationSchema": {
"properties": {
"sub": {
"title": "Sub",
"type": "string"
},
"email": {
"title": "Email",
"type": "string"
},
"email_verified": {
"title": "Email Verified",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"sub",
"email",
"email_verified"
],
"title": "UserInfoResponse",
"type": "object"
},
"definedIn": "beyondigital_auth.types.UserInfoResponse",
"source": {
"file": "src/beyondigital_auth/types.py",
"line": 73
}
}