/**
 * Core authentication manager for the Datalayer Client
 */
import type { AuthOptions, AuthResult, TokenStorage, TokenValidationResult } from './types';
import { UserDTO } from '../../models/UserDTO';
/**
 * Authentication Manager for Datalayer Client
 * Provides a unified interface for all authentication methods
 */
export declare class AuthenticationManager {
    private strategies;
    private storage;
    private iamRunUrl;
    private currentUser?;
    private currentToken?;
    /**
     * Create an AuthenticationManager instance
     * @param iamRunUrl - IAM service URL (e.g., "https://prod1.datalayer.run")
     * @param storage - Token storage backend (optional, defaults to auto-detected)
     */
    constructor(iamRunUrl: string, storage?: TokenStorage);
    /**
     * Login using various authentication methods
     * Automatically selects the appropriate strategy based on options
     *
     * @param options - Authentication options
     * @returns Authentication result with user and token
     * @throws Error if authentication fails or no suitable strategy found
     *
     * @example
     * // Token-based auth
     * const result = await auth.login({ token: 'abc123' });
     *
     * @example
     * // Credentials-based auth
     * const result = await auth.login({
     *   handle: 'user@example.com',
     *   password: 'secret'
     * });
     *
     * @example
     * // Storage-based auth (uses stored token)
     * const result = await auth.login({});
     */
    login(options?: AuthOptions): Promise<AuthResult>;
    /**
     * Logout the current user
     * Calls the logout API and clears stored tokens
     */
    logout(): Promise<void>;
    /**
     * Get the current user profile
     * Uses cached user if available, otherwise fetches from API
     *
     * @returns Current user or null if not authenticated
     */
    whoami(): Promise<UserDTO | null>;
    /**
     * Validate a token
     * Checks if a token is valid by attempting to get the user profile
     *
     * @param token - Token to validate
     * @returns Validation result with user if valid
     */
    validateToken(token: string): Promise<TokenValidationResult>;
    /**
     * Get the stored token from storage
     * @returns Stored token or null
     */
    getStoredToken(): string | null;
    /**
     * Store a token in storage
     * @param token - Token to store
     */
    storeToken(token: string): void;
    /**
     * Clear the stored token
     */
    clearStoredToken(): void;
    /**
     * Get the current cached user
     * @returns Current user or undefined
     */
    getCurrentUser(): UserDTO | undefined;
    /**
     * Get the current token
     * @returns Current token or undefined
     */
    getCurrentToken(): string | undefined;
    /**
     * Check if user is currently authenticated
     * @returns True if user is authenticated
     */
    isAuthenticated(): boolean;
}
