import type { BrowserAdapter } from "@sudobility/webgraph_parser"; import type { FormInfo } from "@sudobility/testomniac_types"; import { type SSOButtonInfo } from "@sudobility/webgraph_parser"; export type { LoginConfig } from "@sudobility/testomniac_types"; import type { LoginConfig } from "@sudobility/testomniac_types"; export interface LoginStep { action: "type" | "hover" | "click" | "pressKey"; selector?: string; value?: string; key?: string; } /** * Build variable-driven login steps from a detected login form. Values use * {credential.*} placeholders resolved at execution time — no secrets here. * Consolidates the email/password field detection into one place. */ export declare function buildLoginSteps(form: { fields: Array<{ type?: string; name?: string; placeholder?: string; selector?: string; }>; }, submitSelector: string | undefined): LoginStep[]; export declare class LoginManager { private state; private adapter; private config; private baseOrigin; constructor(adapter: BrowserAdapter, config: LoginConfig, baseOrigin: string); /** Check if currently in a login flow (scope boundary should be suspended) */ isInLoginFlow(): boolean; /** Check if successfully logged in */ isLoggedIn(): boolean; /** Get the login configuration */ getConfig(): LoginConfig; /** Mark login flow as started (suspends scope boundary) */ beginLoginFlow(): void; /** Mark login flow as ended (re-enables scope boundary) */ endLoginFlow(): void; /** * Perform initial login before scanning begins. * Navigates to login URL if configured, detects the login page, and authenticates. */ performInitialLogin(): Promise; /** * Execute the login based on auth provider type and detected page elements. */ private executeLogin; /** * Execute email/password login using form fields. */ executeEmailPasswordLogin(form: FormInfo | null): Promise; /** * Execute SSO login by clicking the provider button and completing the flow. */ executeSSOLogin(ssoButton: SSOButtonInfo): Promise; /** * Verify that login was successful by checking the current page * is no longer a login page. */ private verifyLoginSuccess; /** * Detect if the session has expired (redirected to login page). */ detectSessionExpiry(): Promise; /** * Re-login after session expiry. */ reLogin(): Promise; } //# sourceMappingURL=login-manager.d.ts.map