import { CustomLogger } from '@forgerock/sdk-logger'; import { Micro } from 'effect'; import type { GetAuthorizationUrlOptions, WellknownResponse } from '@forgerock/sdk-types'; import type { AuthorizationError, AuthorizationSuccess, OptionalAuthorizeOptions } from './authorize.request.types.js'; import type { ClientStore } from './client.types.js'; import type { OidcConfig } from './config.types.js'; /** * @function createParAuthorizeUrlµ * @description Pushed Authorization Request (RFC 9126): POSTs all authorize * parameters to the PAR endpoint, then returns a slim URL containing only * `client_id` and `request_uri` — keeping sensitive params out of the * browser address bar. * @param wellknown - The well-known configuration; provides the PAR endpoint * and the authorization endpoint origin used to build the slim URL. * @param config - The OIDC client configuration. * @param log - CustomLogger; used to warn on short PAR `expires_in` windows. * @param store - The RTK client store exposing `oidcApi.endpoints.par`. * @param options - Optional request-level overrides; `prompt` is split out * so it appears on the slim URL while the rest of the params go in the * PAR POST body. * @returns A `Micro` that resolves to the slim authorize URL string or * fails with a typed `AuthorizationError`. */ export declare function createParAuthorizeUrlµ(wellknown: WellknownResponse, config: OidcConfig, log: CustomLogger, store: ClientStore, options?: OptionalAuthorizeOptions): Micro.Micro; /** * @function authorizeµ * @description Builds an authorization URL and dispatches the authorize * request, transparently using PAR (RFC 9126) when the server mandates it * via `require_pushed_authorization_requests` or when the consumer opts in * with `config.par`. Otherwise builds a full authorize URL and dispatches * via direct fetch (pi.flow) or iframe. * @param wellknown - The well-known configuration for the OIDC server, * including `authorization_endpoint` and (optionally) the PAR endpoint. * @param config - The OIDC client configuration (clientId, redirectUri, * scope, responseType, and the optional `par` opt-in flag). * @param log - The CustomLogger used for debug and error trace. * @param store - The RTK client store providing the `oidcApi` endpoints. * @param options - Optional request-level overrides for the authorize call. * @param useParFlow - Boolean resolved by the caller (e.g. `client.store`) * indicating whether to use the PAR flow. The caller owns the derivation * logic (`config.par ?? require_pushed_authorization_requests === true`); * this function simply routes on the resolved value. * @returns A `Micro` that resolves to an `AuthorizationSuccess` containing * the `code` and `state`, or fails with a typed `AuthorizationError`. */ export declare function authorizeµ(wellknown: WellknownResponse, config: OidcConfig, log: CustomLogger, store: ClientStore, options: GetAuthorizationUrlOptions | undefined, useParFlow: boolean): Micro.Micro; //# sourceMappingURL=authorize.request.d.ts.map