/** * Sets cache prevention headers to prevent CDN/proxy caching. * @param headers - The Headers object to set the cache prevention headers on. */ export declare function setCachePreventionHeaders(headers: Headers): void; export declare function redirectWithFallback(redirectUri: string, headers?: Headers): Response; export declare function errorResponseWithFallback(errorBody: { error: { message: string; description: string; }; }): Response; type EvaluateRecentAuthParameters = { authTime: unknown; maxAgeSeconds: number; nowSeconds: number; }; /** * Evaluate whether an authentication is recent enough. * * Fails closed: a missing or non-finite `authTime` is reported as stale. A * future `authTime` (clock skew) is treated as recent rather than stale, and * the `maxAge` boundary is inclusive. */ export declare function evaluateRecentAuth({ authTime, maxAgeSeconds, nowSeconds }: EvaluateRecentAuthParameters): { readonly authenticatedAt: null; readonly isStale: true; } | { readonly authenticatedAt: Date; readonly isStale: boolean; }; /** * Returns a function that can only be called once. * Subsequent calls will return the result of the first call. * This is useful for lazy initialization. * @param fn - The function to be called once. * @returns A function that can only be called once. */ export declare function lazy(fn: (...args: TArgs) => TResult): (...args: TArgs) => TResult; export {};