UNPKG

homebridge-unifi-ap-light

Version:
39 lines 1.2 kB
import { Logger } from 'homebridge'; /** * Manages authentication sessions and re-authentication. */ export declare class SessionManager { private axiosInstance; private host; private username; private password; private log; private siteMap; private isUniFiOS; constructor(host: string, username: string, password: string, log: Logger); /** * Authenticates using both methods in parallel, and adopts the first one that succeeds. */ authenticate(): Promise<void>; /** * Auth using /api/login for self-hosted consoles. * Returns a fully-configured Axios instance. */ private tryPrimaryAuth; /** * Auth using /api/auth/login for UniFi OS consoles. * Returns a fully-configured Axios instance. */ private trySecondaryAuth; /** * Handles API requests with retry on 401 */ request(config: any): Promise<import("axios").AxiosResponse<any, any>>; /** * Load available sites from the appropriate endpoint. */ private loadSites; getSiteName(friendlyName: string): string | undefined; getAvailableSitePairs(): string[]; } //# sourceMappingURL=sessionManager.d.ts.map