/** * Shared Digest Authentication session manager. * Caches auth parameters (realm, nonce, HA1) to avoid a 401 round-trip * on every request. Used by both PhilipsTVClient and NotifyChangeClient. */ export declare class DigestAuthSession { private readonly username; private readonly password; private cachedAuth; constructor(username: string, password: string); /** Whether we have cached credentials (can skip the initial 401). */ get hasCachedAuth(): boolean; /** Clear cached auth state (e.g., on nonce expiry). */ clear(): void; /** * Build a digest Authorization header using cached auth parameters. * Increments the nonce count for each use. * Returns null if no cached auth is available. */ buildHeader(method: string, uri: string): string | null; /** * Parse a WWW-Authenticate header from a 401 response and cache * the digest parameters for future requests. * Returns false if the header is not a valid Digest challenge. */ cacheFromChallenge(wwwAuthHeader: string): boolean; }