//#region src/auth/types.d.ts type AuthenticationMode = "json" | "cookie" | "session"; type LocalLoginPayload = { email: string; password: string; }; type LDAPLoginPayload = { identifier: string; password: string; }; type LoginPayload = LocalLoginPayload | LDAPLoginPayload; type LoginOptions = { /** The user's one-time-password (if MFA is enabled). */ otp?: string; /** Whether to retrieve the refresh token in the JSON response, or in a httpOnly cookie. One of `json`, `cookie` or `session`. Defaults to `cookie`. */ mode?: AuthenticationMode; /** Use a specific authentication provider (does not work for SSO that relies on browser redirects). */ provider?: string; }; type LogoutOptions = { refresh_token?: string; mode?: AuthenticationMode; }; type RefreshOptions = { refresh_token?: string; mode?: AuthenticationMode; }; interface AuthenticationData { access_token: string | null; refresh_token: string | null; expires: number | null; expires_at: number | null; } interface AuthenticationStorage { get: () => Promise | AuthenticationData | null; set: (value: AuthenticationData | null) => Promise | unknown; } interface AuthenticationConfig { autoRefresh: boolean; msRefreshBeforeExpires: number; credentials?: RequestCredentials; storage?: AuthenticationStorage; } interface AuthenticationClient<_Schema> { login(payload: LocalLoginPayload, options?: LoginOptions): Promise; login(payload: LDAPLoginPayload, options?: LoginOptions): Promise; refresh(options?: RefreshOptions): Promise; logout(options?: LogoutOptions): Promise; stopRefreshing(): void; getToken(): Promise; setToken(access_token: string | null): Promise; } interface StaticTokenClient<_Schema> { getToken(): Promise; setToken(access_token: string | null): Promise; } //#endregion export { AuthenticationClient, AuthenticationConfig, AuthenticationData, AuthenticationMode, AuthenticationStorage, LDAPLoginPayload, LocalLoginPayload, LoginOptions, LoginPayload, LogoutOptions, RefreshOptions, StaticTokenClient }; //# sourceMappingURL=types.d.ts.map