/** * Authentication Manager * * Orchestrates the multi-step authentication flow: * 1. AWS Cognito authentication (user/password or refresh token) * 2. MyDolphin backend authentication * 3. AWS IoT temporary credentials acquisition */ import { type AxiosInstance } from 'axios'; import type { Logger } from 'homebridge'; import { CredentialManager } from './credentialManager.js'; import type { AuthConfig, LoginResult } from './types.js'; /** * Manages the complete authentication flow for MyDolphin Plus */ export declare class AuthenticationManager { private readonly log; private readonly httpClient; private readonly credentials; private readonly config; private iotRegion; private iotEndpoint; constructor(config: AuthConfig, log: Logger); /** * Complete authentication flow */ login(): Promise; /** * Step 1: Authenticate with AWS Cognito */ private authenticateWithCognito; /** * Step 2: Authenticate with MyDolphin backend using Cognito JWT */ private authenticateWithMyDolphin; /** * Step 3: Get temporary AWS credentials for IoT access */ private getAWSCredentials; /** * Discover the IoT endpoint using AWS IoT DescribeEndpoint API */ private discoverIoTEndpoint; /** * Ensure credentials are valid, refresh if needed */ ensureValidCredentials(): Promise; /** * Check if credentials need refresh */ needsRefresh(): boolean; /** * Get credential manager */ getCredentialManager(): CredentialManager; /** * Get IoT region */ getIoTRegion(): string; /** * Get IoT endpoint */ getIoTEndpoint(): string; /** * Get HTTP client for additional API calls */ getHttpClient(): AxiosInstance; } //# sourceMappingURL=authenticationManager.d.ts.map