/*! * @plusauth/oidc-client-js v1.9.0 * https://github.com/PlusAuth/oidc-client-js * (c) 2026 @plusauth/oidc-client-js Contributors * Released under the MIT License */ //#region src/constants/events.d.ts declare const Events: { readonly USER_LOGOUT: "user_logout"; readonly USER_LOGIN: "user_login"; readonly SILENT_RENEW_SUCCESS: "silent_renew_success"; readonly SILENT_RENEW_ERROR: "silent_renew_error"; readonly SESSION_CHANGE: "session_change"; }; type EventTypes = "user_logout" | "user_login" | "silent_renew_success" | "silent_renew_error" | "session_change" | "session_error"; //#endregion //#region src/helpers/event_emitter.d.ts type Listener = (...args: any) => void; declare class EventEmitter { callbacks: Record; constructor(); once(event: T, fn: (...args: any[]) => void): this; on(event: T, cb: (...args: any[]) => void): this; off(event?: T, fn?: (...args: any[]) => void): this; emit(event: T, ...args: any[]): this; } //#endregion //#region src/helpers/state_manager/state_store.d.ts interface StateStore> { init?(): Promise>; } declare abstract class StateStore> { prefix: string; constructor(prefix?: string); abstract get(key: string): Promise; abstract set(key: string, value: T): Promise; abstract del(key: string): Promise; abstract clear(maxAge?: number): Promise; } //#endregion //#region src/helpers/state_manager/in_memory.d.ts declare class InMemoryStateStore extends StateStore { map: Map; clear(before?: number): Promise; del(key: string): Promise; get(key: string): Promise; set(key: string, value: any): Promise; } //#endregion //#region src/helpers/state_manager/local_storage.d.ts declare class LocalStorageStateStore extends StateStore { constructor(prefix?: string); get(key: string): Promise; set(key: string, value: T): Promise; del(key: string): Promise; clear(before?: number): Promise; } //#endregion //#region src/utils/iframe.d.ts /** * Default HTML attributes applied to every hidden iframe created by * {@link createHiddenFrame} and used internally by {@link runIframe}. * * These attributes control accessibility and identification of the iframe * used during silent authentication and session-related operations. * * ## Customization * This object is **intentionally mutable** and acts as a global extension point. * Applications may modify or extend the attributes to adjust how the iframe is * rendered—for example, to add monitoring hooks, test selectors, or custom * accessibility attributes. * * Modifications must be applied **before** any iframe-related `OIDCClient` * methods are called (such as {@link OIDCClient.silentLogin}), because each * iframe is created using a snapshot of `DefaultIframeAttributes` at creation time. * * ### Example: Adding a custom attribute * * ```ts * import { DefaultIframeAttributes, OIDCClient } from "@plusauth/oidc-client-js"; * * // Add a custom data attribute to all future hidden iframes * DefaultIframeAttributes["data-myapp"] = "example"; * * const oidc = new OIDCClient({ ... }); * await oidc.silentLogin(); * * // The silent login iframe now includes: