import { IRPCProtocol } from '@opensumi/ide-connection';
import { AuthenticationProviderInformation, AuthenticationProviderSessionOptions, AuthenticationSession, AuthenticationSessionAccountInformation, AuthenticationSessionsChangeEvent, Event } from '@opensumi/ide-core-common';
import { IExtHostAuthentication } from '../../../common/vscode';
import { IExtensionDescription } from '../../../common/vscode/extension';
import type vscode from 'vscode';
export declare function createAuthenticationApiFactory(extension: IExtensionDescription, extHostAuthentication: ExtHostAuthentication): typeof vscode.authentication;
export declare class ExtHostAuthentication implements IExtHostAuthentication {
    protected readonly logger: import("@opensumi/ide-core-common").IDebugLog;
    private _proxy;
    private _authenticationProviders;
    private _providers;
    private _onDidChangeAuthenticationProviders;
    readonly onDidChangeAuthenticationProviders: Event<vscode.AuthenticationProvidersChangeEvent>;
    private _onDidChangeSessions;
    readonly onDidChangeSessions: Event<vscode.AuthenticationSessionsChangeEvent>;
    private _inFlightRequests;
    constructor(mainContext: IRPCProtocol);
    $setProviders(providers: vscode.AuthenticationProviderInformation[]): Promise<void>;
    getProviderIds(): Promise<ReadonlyArray<string>>;
    get providers(): ReadonlyArray<vscode.AuthenticationProviderInformation>;
    getSession(requestingExtension: IExtensionDescription, providerId: string, scopes: string[], options?: vscode.AuthenticationGetSessionOptions): Promise<vscode.AuthenticationSession | undefined>;
    private _getSession;
    logout(providerId: string, sessionId: string): Promise<void>;
    getAccounts(providerId: string): Promise<AuthenticationSessionAccountInformation[]>;
    registerAuthenticationProvider(id: string, label: string, provider: vscode.AuthenticationProvider, options?: vscode.AuthenticationProviderOptions): vscode.Disposable;
    $login(providerId: string, scopes: string[], options: AuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
    $logout(providerId: string, sessionId: string): Promise<void>;
    $getSessions(providerId: string, scopes: string[], options: AuthenticationProviderSessionOptions): Promise<ReadonlyArray<AuthenticationSession>>;
    $getSessionAccessToken(providerId: string, sessionId: string): Promise<string>;
    $onDidChangeAuthenticationSessions(id: string, label: string, event: AuthenticationSessionsChangeEvent): Promise<void>;
    $onDidChangeAuthenticationProviders(added: AuthenticationProviderInformation[], removed: AuthenticationProviderInformation[]): Promise<void>;
}
//# sourceMappingURL=ext.host.authentication.d.ts.map