import { Event } from "../../../../base/common/event.js"; import { Disposable, IDisposable } from "../../../../base/common/lifecycle.js"; import { IProductService } from "../../../../platform/product/common/productService.service.js"; import { ISecretStorageService } from "../../../../platform/secrets/common/secrets.service.js"; import { IAuthenticationAccessService } from "./authenticationAccessService.service.js"; import { AuthenticationProviderInformation, AuthenticationSession, AuthenticationSessionAccount, AuthenticationSessionsChangeEvent, IAuthenticationCreateSessionOptions, IAuthenticationGetSessionsOptions, IAuthenticationProvider, IAuthenticationProviderHostDelegate, IAuthenticationWwwAuthenticateRequest } from "../common/authentication.js"; import { IAuthenticationService } from "../common/authentication.service.js"; import { IBrowserWorkbenchEnvironmentService } from "../../environment/browser/environmentService.service.js"; import { IExtensionService } from "../../extensions/common/extensions.service.js"; import { ILogService } from "../../../../platform/log/common/log.service.js"; import { URI } from "../../../../base/common/uri.js"; import { IAuthorizationProtectedResourceMetadata, IAuthorizationServerMetadata } from "../../../../base/common/oauth.js"; export declare function getAuthenticationProviderActivationEvent(id: string): string; export type AuthenticationSessionInfo = { readonly id: string; readonly accessToken: string; readonly providerId: string; readonly canSignOut?: boolean; }; export declare function getCurrentAuthenticationSessionInfo(secretStorageService: ISecretStorageService, productService: IProductService): Promise; export declare class AuthenticationService extends Disposable implements IAuthenticationService { private readonly _extensionService; private readonly _environmentService; private readonly _logService; readonly _serviceBrand: undefined; private _onDidRegisterAuthenticationProvider; readonly onDidRegisterAuthenticationProvider: Event; private _onDidUnregisterAuthenticationProvider; readonly onDidUnregisterAuthenticationProvider: Event; private _onDidChangeSessions; readonly onDidChangeSessions: Event<{ providerId: string; label: string; event: AuthenticationSessionsChangeEvent; }>; private _onDidChangeDeclaredProviders; readonly onDidChangeDeclaredProviders: Event; private _authenticationProviders; private _authenticationProviderDisposables; private _dynamicAuthenticationProviderIds; private readonly _delegates; private _disposedSource; constructor(_extensionService: IExtensionService, authenticationAccessService: IAuthenticationAccessService, _environmentService: IBrowserWorkbenchEnvironmentService, _logService: ILogService); private _declaredProviders; get declaredProviders(): AuthenticationProviderInformation[]; private _registerEnvContributedAuthenticationProviders; private _registerAuthenticationExtensionPointHandler; registerDeclaredAuthenticationProvider(provider: AuthenticationProviderInformation): void; unregisterDeclaredAuthenticationProvider(id: string): void; isAuthenticationProviderRegistered(id: string): boolean; isDynamicAuthenticationProvider(id: string): boolean; registerAuthenticationProvider(id: string, authenticationProvider: IAuthenticationProvider): void; unregisterAuthenticationProvider(id: string): void; getProviderIds(): string[]; getProvider(id: string): IAuthenticationProvider; getAccounts(id: string): Promise>; getSessions(id: string, scopeListOrRequest?: ReadonlyArray | IAuthenticationWwwAuthenticateRequest, options?: IAuthenticationGetSessionsOptions, activateImmediate?: boolean): Promise>; createSession(id: string, scopeListOrRequest: ReadonlyArray | IAuthenticationWwwAuthenticateRequest, options?: IAuthenticationCreateSessionOptions): Promise; removeSession(id: string, sessionId: string): Promise; getOrActivateProviderIdForServer(authorizationServer: URI, resourceServer?: URI): Promise; createDynamicAuthenticationProvider(authorizationServer: URI, serverMetadata: IAuthorizationServerMetadata, resource: IAuthorizationProtectedResourceMetadata | undefined): Promise; registerAuthenticationProviderHostDelegate(delegate: IAuthenticationProviderHostDelegate): IDisposable; private matchesProvider; private tryActivateProvider; }