import { Clock, JwtSigner, Result, FederationError, ValidatedTrustChain, EntityId, FederationKeyProvider, ParsedEntityStatement, TrustAnchorSet, FederationOptions, ReplayStore, EntityRole, EntityContext, DiscoveryResult, JWKSet, FederationMetadata, FederationEntityMetadataSchema } from '@oidfed/core'; export { EntityId, FederationError, FederationOptions, Result, TrustAnchorSet } from '@oidfed/core'; import { z } from 'zod'; interface ClientAssertionOptions { readonly expiresInSeconds?: number; /** NumericDate clock used for iat and exp. */ readonly clock?: Clock; } /** * Create a client assertion JWT for `private_key_jwt` authentication. * * This is an OIDC/OAuth2-specific concept used when the RP authenticates * to the OP's token endpoint using a signed JWT assertion. */ declare function createClientAssertion(clientId: string, audience: string, signer: JwtSigner, options?: ClientAssertionOptions): Promise; interface ProtocolSigningKeyProvider { getRequestObjectSigner(): Promise; getClientAssertionSigner?(): Promise; } declare class StaticProtocolSigningKeyProvider implements ProtocolSigningKeyProvider { private readonly requestObjectSigner; private readonly clientAssertionSigner; constructor(options: { requestObjectSigner: JwtSigner; clientAssertionSigner?: JwtSigner; }); getRequestObjectSigner(): Promise; getClientAssertionSigner(): Promise; } /** * Optional context passed to adapter methods when the registration request * carried a `peer_trust_chain` JWS header. The peer chain provides the OP's * metadata/policy as the RP resolved it; the adapter MAY consult these * RP-chosen values when validating client metadata or constructing the * response. */ interface RegistrationProtocolAdapterContext { /** * The OP's resolved metadata as derived from the validated peer chain * (validated by the federation handler before this is passed in). When * absent, no peer chain was supplied or it failed validation. */ readonly peerResolvedOpMetadata?: Readonly>; } /** * Protocol-specific adapter for the federation registration endpoint. * * The federation registration handler is protocol-agnostic by default. * When an adapter is provided, it is called for protocol-specific metadata * validation and enrichment (e.g., OIDC RP metadata validation). */ interface RegistrationProtocolAdapter { /** * Validate protocol-specific client metadata from the registration request. * Called after federation-layer validation succeeds. * * @param raw - The raw metadata object from the registration request * @param context - Optional adapter context (peer chain metadata, etc.) * @returns The validated metadata or a federation error */ validateClientMetadata(raw: Record, context?: RegistrationProtocolAdapterContext): Result, FederationError>; /** * Enrich the registration response metadata with protocol-specific fields. * Called before the response is signed and returned. * * @param rpMeta - The RP's resolved metadata * @param trustChain - The validated trust chain for the RP * @param context - Optional adapter context (peer chain metadata, etc.) * @returns The enriched metadata for the response */ enrichResponseMetadata(rpMeta: Record, trustChain: ValidatedTrustChain, context?: RegistrationProtocolAdapterContext): Record; } /** * OIDC-specific registration protocol adapter. * * Validates `openid_relying_party` metadata against the OIDC RP metadata schema * and enriches the registration response with `client_id`. * * Implements the `RegistrationProtocolAdapter` interface from `./adapter-types.js`. */ declare class OIDCRegistrationAdapter implements RegistrationProtocolAdapter { validateClientMetadata(raw: Record): Result, FederationError>; enrichResponseMetadata(rpMeta: Record, trustChain: ValidatedTrustChain): Record; } /** RP-side automatic registration: builds a signed Request Object with embedded trust chain. */ type RequestDelivery = "query" | "form_post" | "request_uri" | "par"; interface AutomaticRegistrationConfig { readonly entityId: EntityId; readonly protocolKeyProvider: ProtocolSigningKeyProvider; readonly authorityHints: readonly [EntityId, ...EntityId[]]; readonly metadata: Record>; /** TTL for the Request Object JWT in seconds (default: 300). */ readonly requestObjectTtlSeconds?: number; /** * When true, attach the peer_trust_chain JWS header — a Trust Chain for * the OP that ends at the same Trust Anchor as the RP chain. Disabled by * default; set to true only when the RP wants the OP to use the * metadata/policy values from the RP-built peer chain (for the * Federation/Metadata Integrity properties). The library throws if the * peer chain to the shared Trust Anchor cannot be built. */ readonly includePeerTrustChain?: boolean; /** * Selects how the signed Request Object reaches the OP's authorization * endpoint. Defaults to `"form_post"` — the safest choice for Request * Objects that carry an embedded `trust_chain` (the JWT can easily exceed * the practical URL/header length limits of HTTP intermediaries). * * Pass `"query"` to preserve the historical 0.3.x GET-query behavior. */ readonly requestDelivery?: RequestDelivery; /** * For `requestDelivery: "request_uri"`: the publicly-reachable URL at * which the RP will host the signed Request Object JWT. REQUIRED in that * mode and ignored otherwise. The library does NOT host the JWT — the * caller must serve the returned `requestObjectJwt` at this URL with * Content-Type `application/oauth-authz-req+jwt`, typically with a short * TTL and single-use semantics. */ readonly requestUri?: string; } interface AutomaticRegistrationResultBase { readonly requestObjectJwt: string; readonly trustChain: ValidatedTrustChain; readonly trustChainExpiresAt: number; } /** * Discriminated union over `delivery`. Each variant carries exactly the * additional fields the caller needs to dispatch the Request Object. */ type AutomaticRegistrationResult = (AutomaticRegistrationResultBase & { readonly delivery: "query"; /** Full authorization-endpoint URL with `?request=…&client_id=…`. Redirect the user-agent here. */ readonly authorizationUrl: string; }) | (AutomaticRegistrationResultBase & { readonly delivery: "form_post"; /** Bare authorization-endpoint URL. POST `formParams` here. */ readonly authorizationEndpoint: string; /** Form fields to submit as `application/x-www-form-urlencoded` body. */ readonly formParams: Record; }) | (AutomaticRegistrationResultBase & { readonly delivery: "request_uri"; /** Echoes the caller-supplied URI; cache the `requestObjectJwt` under this URL. */ readonly requestUri: string; /** Full authorization-endpoint URL with `?request_uri=…&client_id=…`. Redirect the user-agent here. */ readonly authorizationUrl: string; }) | (AutomaticRegistrationResultBase & { readonly delivery: "par"; /** PAR endpoint URL the library POSTed to. */ readonly pushedAuthorizationRequestEndpoint: string; /** Full authorization-endpoint URL with `?request_uri=urn:…&client_id=…`. Redirect the user-agent here. */ readonly authorizationUrl: string; /** The `urn:`-style request URI returned by the PAR endpoint. */ readonly parRequestUri: string; /** Absolute expiration time (seconds since epoch) computed from the PAR `expires_in` response. */ readonly parExpiresAt: number; }); interface ExplicitRegistrationConfig { readonly entityId: EntityId; readonly keyProvider: FederationKeyProvider; readonly authorityHints: readonly [EntityId, ...EntityId[]]; readonly metadata: Record>; readonly entityConfigurationTtlSeconds?: number; readonly trustMarks?: ReadonlyArray>; /** * When true, attach the peer_trust_chain JWS header — a Trust Chain for * the OP that ends at the same Trust Anchor as the RP chain. Disabled by * default; set to true only when the RP wants the OP to use the * metadata/policy values from the RP-built peer chain (Federation / * Metadata Integrity properties). The library throws if the peer chain * to the shared Trust Anchor cannot be built. The current emit path * always sends an Entity Configuration JWT body (never a Trust-Chain * JSON body), so the mutual-exclusion rule between peer_trust_chain * and Trust-Chain-JSON request body is structurally satisfied here; * do NOT add a Trust-Chain-JSON body shape without also refusing this * option in that branch. */ readonly includePeerTrustChain?: boolean; } interface ExplicitRegistrationResult { readonly registrationStatement: ParsedEntityStatement; readonly clientId: string; readonly clientSecret?: string; readonly expiresAt: number; readonly registeredMetadata: Readonly>; /** Trust chain expiration — RP must not use the registration past this time. */ readonly trustChainExpiresAt: number; } /** OP-side explicit registration endpoint handler (self-contained, no authority dep). */ interface ExplicitRegistrationHandlerConfig { /** The OP's Entity Identifier — used as the aud check target and as the issuer of the response. */ readonly opEntityId: EntityId; /** Federation-only signing key provider used for the signed registration response. */ readonly keyProvider: FederationKeyProvider; /** Non-empty trust anchors required for RP trust chain resolution. */ readonly trustAnchors: TrustAnchorSet; /** TTL in seconds for the registration response JWT. Capped to chain expiry when a chain is resolved. */ readonly registrationResponseTtlSeconds?: number; /** Optional protocol-specific adapter for metadata validation/enrichment. */ readonly registrationProtocolAdapter?: RegistrationProtocolAdapter; /** Optional generator producing a client_secret embedded in the response. Returning undefined omits the field. */ readonly generateClientSecret?: (sub: EntityId) => Promise; /** Optional late pre-commit hook fired after response preparation and before `onRegistration`. */ readonly onRegistrationInvalidation?: (sub: EntityId) => Promise; /** Optional callback fired when dynamic registration completes successfully. */ readonly onRegistration?: (sub: EntityId, clientMetadata: Record, clientSecret?: string) => Promise; /** Federation-wide options (httpClient, clock, etc.). */ readonly options?: FederationOptions; } interface ProcessedRegistration { readonly rpEntityId: EntityId; readonly resolvedRpMetadata: Readonly>; readonly trustChain: ValidatedTrustChain; /** * When the Request Object carried a `peer_trust_chain` JWS header, the * OP's resolved metadata as derived from the RP-supplied peer chain. * Integrators may use these RP-chosen values when creating the client * registration; the library validates structural integrity but does not * auto-apply the values. */ readonly peerResolvedOpMetadata?: Readonly>; } interface ProcessAutomaticRegistrationOptions extends FederationOptions { /** The OP's own Entity Identifier — REQUIRED to prevent cross-OP replay via `aud` validation. */ opEntityId: EntityId; /** Atomic replay protection required for one-time Request Object processing. */ replayStore: ReplayStore; } interface ProcessExplicitRegistrationOptions extends FederationOptions { /** The OP's own Entity Identifier — REQUIRED for `aud` validation. */ opEntityId: EntityId; /** Optional `trust_chain` JWS header value supplied with an entity-statement body. */ trustChainHeader?: readonly string[]; } /** Typed output of Request Object JWT validation. */ interface ValidatedRequestObject { /** The RP's Entity Identifier (from `client_id` / `iss`) */ readonly rpEntityId: EntityId; /** The OP's Entity Identifier (from `aud`) */ readonly opEntityId: string; /** JWT expiration timestamp */ readonly exp: number; /** Unique JWT identifier */ readonly jti: string; /** Issued-at timestamp (if present) */ readonly iat?: number; /** All decoded JWT payload claims */ readonly claims: Readonly>; /** Trust chain from JWT header (if present) */ readonly trustChainHeader?: readonly string[]; /** Peer Trust Chain from JWT header (if present) — Trust Chain for the OP. */ readonly peerTrustChainHeader?: readonly string[]; } /** Context for OP-side automatic registration processing */ interface AutomaticRegistrationContext { /** The OP's own Entity Identifier */ readonly opEntityId: EntityId; /** Maximum allowed clock skew in seconds (default: 60) */ readonly clockSkewSeconds?: number; /** NumericDate clock used for expiry validation. */ readonly clock?: Clock; } type ValidatedRequestObjectResult = Result; interface OidcRelyingPartyRoleConfig { readonly protocolKeyProvider: ProtocolSigningKeyProvider; readonly metadata?: Record; readonly requestObjectTtlSeconds?: number; readonly includePeerTrustChain?: boolean; readonly requestDelivery?: RequestDelivery; readonly requestUri?: string; readonly trustAnchors?: TrustAnchorSet; readonly authorityHints?: readonly EntityId[]; } interface CreateAuthorizationRequestOptions extends FederationOptions { readonly requestDelivery?: RequestDelivery; readonly requestUri?: string; readonly includePeerTrustChain?: boolean; readonly requestObjectTtlSeconds?: number; readonly trustAnchors?: TrustAnchorSet; } declare class OidcRelyingPartyRole implements EntityRole { readonly config: OidcRelyingPartyRoleConfig; static createClientAssertion: typeof createClientAssertion; readonly type = "openid_relying_party"; readonly metadata: Record; private context?; constructor(config: OidcRelyingPartyRoleConfig); initialize(context: EntityContext): void; createClientAssertion(audience: string, options?: ClientAssertionOptions): Promise; automaticallyRegister(params: { readonly opEntityId: string; readonly redirect_uri: string; readonly scope?: string; readonly state?: string; readonly nonce?: string; readonly requestDelivery?: RequestDelivery; readonly requestUri?: string; }, options?: CreateAuthorizationRequestOptions): Promise>; explicitlyRegister(opEntityId: string, options?: FederationOptions & { readonly trustAnchors?: TrustAnchorSet; }): Promise>; createAuthorizationRequest(discovery: DiscoveryResult, authzRequestParams: Record, trustAnchors: TrustAnchorSet, options?: CreateAuthorizationRequestOptions): Promise>; } interface OidcProviderRoleConfig { readonly registrationPath?: string; readonly metadata?: Record; readonly trustAnchors?: TrustAnchorSet; readonly registrationResponseTtlSeconds?: number; readonly registrationProtocolAdapter?: RegistrationProtocolAdapter; readonly generateClientSecret?: (sub: EntityId) => Promise; /** Late pre-commit hook called after validation and response preparation, before `onRegistration`. */ readonly onRegistrationInvalidation?: (sub: EntityId) => Promise; readonly replayStore?: ReplayStore; readonly onRegistration?: (sub: EntityId, clientMetadata: Record, clientSecret?: string) => Promise; } declare class OidcProviderRole implements EntityRole { readonly config: OidcProviderRoleConfig; readonly type = "openid_provider"; readonly metadata: Record; readonly routes: Map Promise>; private context?; constructor(config: OidcProviderRoleConfig); initialize(context: EntityContext): void; processAutomaticRegistration(requestObjectJwt: string, options?: Omit): Promise>; processExplicitRegistration(request: Request): Promise; } interface OAuthClientRoleConfig { readonly protocolKeyProvider: ProtocolSigningKeyProvider; readonly metadata?: Record; readonly requestObjectTtlSeconds?: number; readonly includePeerTrustChain?: boolean; readonly requestDelivery?: RequestDelivery; readonly requestUri?: string; } declare class OAuthClientRole implements EntityRole { readonly config: OAuthClientRoleConfig; static createClientAssertion: typeof createClientAssertion; readonly type = "oauth_client"; readonly metadata: Record; private context?; constructor(config: OAuthClientRoleConfig); initialize(context: EntityContext): void; createAuthorizationRequest(discovery: DiscoveryResult, authzRequestParams: Record, trustAnchors: TrustAnchorSet, options?: FederationOptions): Promise>; } interface OAuthAuthorizationServerRoleConfig { readonly registrationPath?: string; readonly metadata?: Record; readonly trustAnchors?: TrustAnchorSet; readonly registrationResponseTtlSeconds?: number; readonly registrationProtocolAdapter?: RegistrationProtocolAdapter; readonly generateClientSecret?: (sub: EntityId) => Promise; /** Late pre-commit hook called after validation and response preparation. */ readonly onRegistrationInvalidation?: (sub: EntityId) => Promise; } declare class OAuthAuthorizationServerRole implements EntityRole { readonly config: OAuthAuthorizationServerRoleConfig; readonly type = "oauth_authorization_server"; readonly metadata: Record; readonly routes: Map Promise>; constructor(config: OAuthAuthorizationServerRoleConfig); initialize(context: EntityContext): void; } interface OAuthResourceRoleConfig { readonly metadata?: Record; readonly jwks?: JWKSet; } declare class OAuthResourceRole implements EntityRole { readonly config: OAuthResourceRoleConfig; readonly type = "oauth_resource"; readonly metadata: Record; readonly routes: Map Promise>; constructor(config: OAuthResourceRoleConfig); initialize(_context: EntityContext): void; } /** Explicit registration request payload. */ declare const ExplicitRegistrationRequestPayloadSchema: z.ZodObject<{ iss: z.core.$ZodBranded; sub: z.core.$ZodBranded; aud: z.ZodString; iat: z.ZodNumber; exp: z.ZodNumber; jwks: z.ZodObject<{ keys: z.ZodArray; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>; authority_hints: z.ZodArray>; metadata: z.ZodObject<{ federation_entity: z.ZodOptional; federation_list_endpoint: z.ZodOptional; federation_extended_list_endpoint: z.ZodOptional; federation_resolve_endpoint: z.ZodOptional; federation_trust_mark_status_endpoint: z.ZodOptional; federation_trust_mark_list_endpoint: z.ZodOptional; federation_trust_mark_endpoint: z.ZodOptional; federation_historical_keys_endpoint: z.ZodOptional; federation_fetch_endpoint_auth_methods: z.ZodOptional>; federation_list_endpoint_auth_methods: z.ZodOptional>; federation_extended_list_endpoint_auth_methods: z.ZodOptional>; federation_resolve_endpoint_auth_methods: z.ZodOptional>; federation_trust_mark_status_endpoint_auth_methods: z.ZodOptional>; federation_trust_mark_list_endpoint_auth_methods: z.ZodOptional>; federation_trust_mark_endpoint_auth_methods: z.ZodOptional>; federation_historical_keys_endpoint_auth_methods: z.ZodOptional>; endpoint_auth_signing_alg_values_supported: z.ZodOptional>; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; }, z.core.$loose>>; openid_relying_party: z.ZodOptional>; openid_provider: z.ZodOptional>; oauth_authorization_server: z.ZodOptional>; oauth_client: z.ZodOptional>; oauth_resource: z.ZodOptional>; }, z.core.$loose>; trust_marks: z.ZodOptional>>; }, z.core.$loose>; /** Explicit registration response payload. */ declare const ExplicitRegistrationResponsePayloadSchema: z.ZodObject<{ iss: z.core.$ZodBranded; sub: z.core.$ZodBranded; aud: z.ZodString; iat: z.ZodNumber; exp: z.ZodNumber; metadata: z.ZodRecord>; trust_anchor: z.core.$ZodBranded; authority_hints: z.ZodArray>; }, z.core.$loose>; type ExplicitRegistrationRequestPayload = z.infer; type ExplicitRegistrationResponsePayload = z.infer; /** * Typed Zod schemas for all OpenID Federation 1.0 entity type metadata. * * Covers: * - openid_relying_party (OIDC Dynamic Registration 1.0 + Federation 1.0) * - openid_provider (OIDC Discovery 1.0 + Federation 1.0) * - oauth_authorization_server (RFC 8414 + Federation 1.0) * - oauth_client (RFC 7591 + Federation 1.0) * - oauth_resource (RFC 9728 + Federation 1.0) */ declare const OPENID_RP_REGISTRATION_RESPONSE_FIELDS: readonly ["client_id", "client_secret", "client_id_issued_at", "client_secret_expires_at"]; declare const OpenIDRelyingPartyMetadataSchema: z.ZodObject<{ jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; sector_identifier_uri: z.ZodOptional; subject_type: z.ZodOptional>; id_token_signed_response_alg: z.ZodOptional; id_token_encrypted_response_alg: z.ZodOptional; id_token_encrypted_response_enc: z.ZodOptional; userinfo_signed_response_alg: z.ZodOptional; userinfo_encrypted_response_alg: z.ZodOptional; userinfo_encrypted_response_enc: z.ZodOptional; request_object_signing_alg: z.ZodOptional; request_object_encryption_alg: z.ZodOptional; request_object_encryption_enc: z.ZodOptional; token_endpoint_auth_method: z.ZodOptional; token_endpoint_auth_signing_alg: z.ZodOptional; default_max_age: z.ZodOptional; require_auth_time: z.ZodOptional; default_acr_values: z.ZodOptional>; initiate_login_uri: z.ZodOptional; post_logout_redirect_uris: z.ZodOptional>; backchannel_token_delivery_mode: z.ZodOptional; backchannel_client_notification_endpoint: z.ZodOptional; backchannel_authentication_request_signing_alg: z.ZodOptional; backchannel_user_code_parameter: z.ZodOptional; client_registration_types: z.ZodOptional>; signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; scope: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; redirect_uris: z.ZodOptional>; response_types: z.ZodOptional>; grant_types: z.ZodOptional>; application_type: z.ZodOptional>; client_name: z.ZodOptional; client_uri: z.ZodOptional; tos_uri: z.ZodOptional; }, z.core.$loose>; /** * Typed OpenID Relying Party metadata as carried in an Explicit Registration Response. * Includes registration-response credential fields that are not valid in Entity * Configuration or Subordinate Statement metadata. */ declare const OpenIDRelyingPartyRegistrationResponseMetadataSchema: z.ZodObject<{ client_id: z.ZodString; client_secret: z.ZodOptional; client_id_issued_at: z.ZodOptional; client_secret_expires_at: z.ZodOptional; jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; sector_identifier_uri: z.ZodOptional; subject_type: z.ZodOptional>; id_token_signed_response_alg: z.ZodOptional; id_token_encrypted_response_alg: z.ZodOptional; id_token_encrypted_response_enc: z.ZodOptional; userinfo_signed_response_alg: z.ZodOptional; userinfo_encrypted_response_alg: z.ZodOptional; userinfo_encrypted_response_enc: z.ZodOptional; request_object_signing_alg: z.ZodOptional; request_object_encryption_alg: z.ZodOptional; request_object_encryption_enc: z.ZodOptional; token_endpoint_auth_method: z.ZodOptional; token_endpoint_auth_signing_alg: z.ZodOptional; default_max_age: z.ZodOptional; require_auth_time: z.ZodOptional; default_acr_values: z.ZodOptional>; initiate_login_uri: z.ZodOptional; post_logout_redirect_uris: z.ZodOptional>; backchannel_token_delivery_mode: z.ZodOptional; backchannel_client_notification_endpoint: z.ZodOptional; backchannel_authentication_request_signing_alg: z.ZodOptional; backchannel_user_code_parameter: z.ZodOptional; client_registration_types: z.ZodOptional>; signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; scope: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; redirect_uris: z.ZodOptional>; response_types: z.ZodOptional>; grant_types: z.ZodOptional>; application_type: z.ZodOptional>; client_name: z.ZodOptional; client_uri: z.ZodOptional; tos_uri: z.ZodOptional; }, z.core.$loose>; /** * Typed OpenID Provider metadata schema. * Validates parameters from OIDC Discovery 1.0 (Section 3), * IANA OAuth AS Metadata registry entries, session management / logout, * CIBA, and OpenID Federation 1.0 Section 5.1 federation-specific parameters. */ declare const OpenIDProviderMetadataSchema: z.ZodObject<{ client_registration_types_supported: z.ZodOptional>; federation_registration_endpoint: z.ZodOptional; signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; issuer: z.ZodString; authorization_endpoint: z.ZodString; token_endpoint: z.ZodOptional; userinfo_endpoint: z.ZodOptional; jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; registration_endpoint: z.ZodOptional; scopes_supported: z.ZodOptional>; response_types_supported: z.ZodArray; response_modes_supported: z.ZodOptional>; grant_types_supported: z.ZodOptional>; acr_values_supported: z.ZodOptional>; subject_types_supported: z.ZodArray; id_token_signing_alg_values_supported: z.ZodArray; id_token_encryption_alg_values_supported: z.ZodOptional>; id_token_encryption_enc_values_supported: z.ZodOptional>; userinfo_signing_alg_values_supported: z.ZodOptional>; userinfo_encryption_alg_values_supported: z.ZodOptional>; userinfo_encryption_enc_values_supported: z.ZodOptional>; request_object_signing_alg_values_supported: z.ZodOptional>; request_object_encryption_alg_values_supported: z.ZodOptional>; request_object_encryption_enc_values_supported: z.ZodOptional>; token_endpoint_auth_methods_supported: z.ZodOptional>; token_endpoint_auth_signing_alg_values_supported: z.ZodOptional>; display_values_supported: z.ZodOptional>; claim_types_supported: z.ZodOptional>; claims_supported: z.ZodOptional>; service_documentation: z.ZodOptional; claims_locales_supported: z.ZodOptional>; ui_locales_supported: z.ZodOptional>; claims_parameter_supported: z.ZodOptional; request_parameter_supported: z.ZodOptional; request_uri_parameter_supported: z.ZodOptional; require_request_uri_registration: z.ZodOptional; op_policy_uri: z.ZodOptional; op_tos_uri: z.ZodOptional; end_session_endpoint: z.ZodOptional; frontchannel_logout_supported: z.ZodOptional; frontchannel_logout_session_supported: z.ZodOptional; backchannel_logout_supported: z.ZodOptional; backchannel_logout_session_supported: z.ZodOptional; backchannel_token_delivery_modes_supported: z.ZodOptional>; backchannel_authentication_endpoint: z.ZodOptional; backchannel_user_code_parameter_supported: z.ZodOptional; }, z.core.$loose>; type OpenIDRelyingPartyResponseOnlyFields = { readonly [K in (typeof OPENID_RP_REGISTRATION_RESPONSE_FIELDS)[number]]?: never; }; type OpenIDRelyingPartyMetadata = z.infer & OpenIDRelyingPartyResponseOnlyFields; type OpenIDRelyingPartyRegistrationResponseMetadata = z.infer; type OpenIDProviderMetadata = z.infer; /** * Typed OAuth 2.0 Authorization Server metadata schema. * Validates parameters from RFC 8414 (Section 2), extension RFCs * (RFC 7636 PKCE, RFC 8628 Device Auth, RFC 9126 PAR, RFC 9207 Issuer ID, * RFC 9449 DPoP), and OpenID Federation 1.0 Section 5.1.3 extensions. */ declare const OAuthAuthorizationServerMetadataSchema: z.ZodObject<{ client_registration_types_supported: z.ZodOptional>; federation_registration_endpoint: z.ZodOptional; signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; issuer: z.ZodString; authorization_endpoint: z.ZodOptional; token_endpoint: z.ZodOptional; jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; registration_endpoint: z.ZodOptional; scopes_supported: z.ZodOptional>; response_types_supported: z.ZodArray; response_modes_supported: z.ZodOptional>; grant_types_supported: z.ZodOptional>; token_endpoint_auth_methods_supported: z.ZodOptional>; token_endpoint_auth_signing_alg_values_supported: z.ZodOptional>; service_documentation: z.ZodOptional; ui_locales_supported: z.ZodOptional>; op_policy_uri: z.ZodOptional; op_tos_uri: z.ZodOptional; revocation_endpoint: z.ZodOptional; revocation_endpoint_auth_methods_supported: z.ZodOptional>; revocation_endpoint_auth_signing_alg_values_supported: z.ZodOptional>; introspection_endpoint: z.ZodOptional; introspection_endpoint_auth_methods_supported: z.ZodOptional>; introspection_endpoint_auth_signing_alg_values_supported: z.ZodOptional>; code_challenge_methods_supported: z.ZodOptional>; device_authorization_endpoint: z.ZodOptional; pushed_authorization_request_endpoint: z.ZodOptional; require_pushed_authorization_requests: z.ZodOptional; dpop_signing_alg_values_supported: z.ZodOptional>; authorization_response_iss_parameter_supported: z.ZodOptional; }, z.core.$loose>; type OAuthAuthorizationServerMetadata = z.infer; /** * Typed OAuth 2.0 Client metadata schema. * Validates parameters from RFC 7591 (OAuth 2.0 Dynamic Client Registration) * and OpenID Federation 1.0 Section 5.1.4 extensions. */ declare const OAuthClientMetadataSchema: z.ZodObject<{ jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; software_id: z.ZodOptional; software_version: z.ZodOptional; client_registration_types: z.ZodOptional>; signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; redirect_uris: z.ZodOptional>; token_endpoint_auth_method: z.ZodOptional; token_endpoint_auth_signing_alg: z.ZodOptional; grant_types: z.ZodOptional>; response_types: z.ZodOptional>; client_name: z.ZodOptional; client_uri: z.ZodOptional; scope: z.ZodOptional; tos_uri: z.ZodOptional; }, z.core.$loose>; type OAuthClientMetadata = z.infer; /** * Typed OAuth 2.0 Protected Resource metadata schema. * Validates parameters from RFC 9728 (OAuth 2.0 Protected Resource Metadata) * and OpenID Federation 1.0 Section 5.1.5 extensions. */ declare const OAuthResourceMetadataSchema: z.ZodObject<{ signed_jwks_uri: z.ZodOptional; organization_identifier: z.ZodOptional; organization_name: z.ZodOptional; display_name: z.ZodOptional; description: z.ZodOptional; keywords: z.ZodOptional>; contacts: z.ZodOptional>; logo_uri: z.ZodOptional; policy_uri: z.ZodOptional; information_uri: z.ZodOptional; organization_uri: z.ZodOptional; resource: z.ZodString; authorization_servers: z.ZodOptional>; bearer_methods_supported: z.ZodOptional>>; resource_signing_alg_values_supported: z.ZodOptional>; dpop_signing_alg_values_supported: z.ZodOptional>; scopes_supported: z.ZodOptional>; jwks_uri: z.ZodOptional; jwks: z.ZodOptional; kid: z.ZodOptional; use: z.ZodOptional>; alg: z.ZodOptional; key_ops: z.ZodOptional>>; n: z.ZodOptional; e: z.ZodOptional; crv: z.ZodOptional; x: z.ZodOptional; y: z.ZodOptional; }, z.core.$loose>>; }, z.core.$strip>>; }, z.core.$loose>; type OAuthResourceMetadata = z.infer; type OIDCFederationMetadata = FederationMetadata & { readonly federation_entity?: z.infer; readonly openid_relying_party?: OpenIDRelyingPartyMetadata; readonly openid_provider?: OpenIDProviderMetadata; readonly oauth_authorization_server?: OAuthAuthorizationServerMetadata; readonly oauth_client?: OAuthClientMetadata; readonly oauth_resource?: OAuthResourceMetadata; }; export { type AutomaticRegistrationConfig, type AutomaticRegistrationContext, type AutomaticRegistrationResult, type ClientAssertionOptions, type CreateAuthorizationRequestOptions, type ExplicitRegistrationConfig, type ExplicitRegistrationHandlerConfig, type ExplicitRegistrationRequestPayload, type ExplicitRegistrationResponsePayload, type ExplicitRegistrationResult, type OAuthAuthorizationServerMetadata, OAuthAuthorizationServerRole, type OAuthAuthorizationServerRoleConfig, type OAuthClientMetadata, OAuthClientRole, type OAuthClientRoleConfig, type OAuthResourceMetadata, OAuthResourceRole, type OAuthResourceRoleConfig, type OIDCFederationMetadata, OIDCRegistrationAdapter, OidcProviderRole, type OidcProviderRoleConfig, OidcRelyingPartyRole, type OidcRelyingPartyRoleConfig, type OpenIDProviderMetadata, type OpenIDRelyingPartyMetadata, type OpenIDRelyingPartyRegistrationResponseMetadata, type ProcessAutomaticRegistrationOptions, type ProcessExplicitRegistrationOptions, type ProcessedRegistration, type ProtocolSigningKeyProvider, type RegistrationProtocolAdapter, type RegistrationProtocolAdapterContext, type RequestDelivery, StaticProtocolSigningKeyProvider, type ValidatedRequestObject, type ValidatedRequestObjectResult };