import type { AuthCredentials } from "./resolveCredentials"; /** * Builds the lookup key used by the worker-scoped login cache. * * The cache reuses an authenticated `storageState` snapshot across every test * within a Playwright worker that logs in as the same `(baseURL, username)` * pair. Two principles drive the key shape: * * 1. **Username, not username+password.** Different passwords for the same * user are almost always a credential rotation, not a deliberate second * identity — if a test really needs different identities it will use a * different `username`. Including the password would make a typo silently * cache-miss instead of failing loudly, and would also serialise it into * the key string. Kept out for both correctness and minor hygiene. * 2. **`baseURL` is required.** Okta sessions are domain-bound (the auth * cookies are set on the manager origin), so a snapshot from * `https://dev.manager.trackunit.com` cannot authenticate a request to * `https://stage.manager.trackunit.com`. We always partition by baseURL. * * `JSON.stringify` over a fixed-shape object guarantees no collision between * (undefined baseURL, username "X") and (baseURL "X", undefined-equivalent * username) — `null` and `"X"` serialise distinctly, and the field names * anchor each value to its slot. */ export declare const buildLoginCacheKey: (baseURL: string | undefined, credentials: AuthCredentials) => string;