UNPKG

@coretext-ai/qa-google-contacts-a58500d5-8331-4ce9-a140-d204a9fae815

Version:
60 lines 1.53 kB
export interface OAuth2Tokens { access_token?: string | null; refresh_token?: string | null; expiry_date?: number | null; scope?: string | null; token_type?: string | null; } export declare class TokenManager { private readonly tokenPath; constructor(); /** * Store OAuth tokens securely */ storeTokens(tokens: OAuth2Tokens, userId?: string): Promise<void>; /** * Retrieve stored OAuth tokens */ getTokens(userId?: string): Promise<OAuth2Tokens | null>; /** * Delete stored tokens */ deleteTokens(userId?: string): Promise<void>; /** * Encrypt token data using platform keychain or file-based encryption */ private encryptTokenData; /** * Decrypt token data from platform keychain or file */ private decryptTokenData; /** * Platform keychain encryption (macOS/Windows/Linux) */ private encryptWithKeychain; /** * Platform keychain decryption */ private decryptFromKeychain; /** * Delete from keychain */ private deleteFromKeychain; /** * Fallback file-based encryption */ private encryptTokenDataFile; /** * Fallback file-based decryption */ private decryptTokenDataFile; /** * Derive encryption key from system-specific data */ private getDerivedKey; /** * Ensure token directory exists with secure permissions */ private ensureTokenDirectory; } //# sourceMappingURL=token-manager.d.ts.map