import { interfaces } from '@theia/core/shared/inversify'; import { AuthenticationExt, AuthenticationMain } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; import { MessageService } from '@theia/core/lib/common/message-service'; import { StorageService } from '@theia/core/lib/browser'; import { Disposable } from '@theia/core/lib/common/disposable'; import { Event } from '@theia/core/lib/common/event'; import { AuthenticationProvider, AuthenticationProviderSessionOptions, AuthenticationSession, AuthenticationSessionAccountInformation } from '@theia/core/lib/browser/authentication-service'; import * as theia from '@theia/plugin'; export declare function getAuthenticationProviderActivationEvent(id: string): string; export declare class AuthenticationMainImpl implements AuthenticationMain { private readonly proxy; private readonly messageService; private readonly storageService; private readonly authenticationService; private readonly quickPickService; private readonly providers; constructor(rpc: RPCProtocol, container: interfaces.Container); $registerAuthenticationProvider(id: string, label: string, supportsMultipleAccounts: boolean): Promise; $unregisterAuthenticationProvider(id: string): Promise; $updateSessions(id: string, event: theia.AuthenticationProviderAuthenticationSessionsChangeEvent): Promise; $logout(providerId: string, sessionId: string): Promise; $getAccounts(providerId: string): Thenable; $getSession(providerId: string, scopeListOrRequest: ReadonlyArray | theia.AuthenticationWwwAuthenticateRequest, extensionId: string, extensionName: string, options: theia.AuthenticationGetSessionOptions): Promise; protected selectSession(providerId: string, providerName: string, extensionId: string, extensionName: string, potentialSessions: Readonly, scopeListOrRequest: ReadonlyArray | theia.AuthenticationWwwAuthenticateRequest, clearSessionPreference: boolean): Promise; protected getSessionsPrompt(providerId: string, accountName: string, providerName: string, extensionId: string, extensionName: string): Promise; protected loginPrompt(providerName: string, extensionName: string, recreatingSession: boolean, detail?: string): Promise; protected isAccessAllowed(providerId: string, accountName: string, extensionId: string): Promise; protected setTrustedExtensionAndAccountPreference(providerId: string, accountName: string, extensionId: string, extensionName: string, sessionId: string): Promise; $onDidChangeSessions(providerId: string, event: theia.AuthenticationProviderAuthenticationSessionsChangeEvent): void; } export declare class AuthenticationProviderImpl implements AuthenticationProvider, Disposable { private readonly proxy; readonly id: string; readonly label: string; readonly supportsMultipleAccounts: boolean; private readonly storageService; private readonly messageService; /** map from account name to session ids */ private accounts; /** map from session id to account name */ private sessions; private readonly onDidChangeSessionsEmitter; readonly onDidChangeSessions: Event; constructor(proxy: AuthenticationExt, id: string, label: string, supportsMultipleAccounts: boolean, storageService: StorageService, messageService: MessageService); dispose(): void; fireSessionsChanged(event: theia.AuthenticationProviderAuthenticationSessionsChangeEvent): void; hasSessions(): boolean; private registerSession; signOut(accountName: string): Promise; getSessions(scopes?: string[], account?: AuthenticationSessionAccountInformation): Promise>; updateSessionItems(event: theia.AuthenticationProviderAuthenticationSessionsChangeEvent): Promise; login(scopes: string[], options: AuthenticationProviderSessionOptions): Promise; logout(sessionId: string): Promise; createSession(scopes: string[], options: AuthenticationProviderSessionOptions): Thenable; removeSession(sessionId: string): Thenable; } //# sourceMappingURL=authentication-main.d.ts.map