import { Event } from "../../../../base/common/event.js";
import { IAuthorizationProtectedResourceMetadata, IAuthorizationServerMetadata } from "../../../../base/common/oauth.js";
import { URI } from "../../../../base/common/uri.js";
export declare const INTERNAL_AUTH_PROVIDER_PREFIX = "__";
export interface AuthenticationSessionAccount {
    label: string;
    id: string;
}
export interface AuthenticationSession {
    id: string;
    accessToken: string;
    account: AuthenticationSessionAccount;
    scopes: ReadonlyArray<string>;
    idToken?: string;
}
export interface AuthenticationSessionsChangeEvent {
    added: ReadonlyArray<AuthenticationSession> | undefined;
    removed: ReadonlyArray<AuthenticationSession> | undefined;
    changed: ReadonlyArray<AuthenticationSession> | undefined;
}
export interface AuthenticationProviderInformation {
    id: string;
    label: string;
    authorizationServerGlobs?: ReadonlyArray<string>;
}
export interface IAuthenticationCreateSessionOptions {
    activateImmediate?: boolean;
    account?: AuthenticationSessionAccount;
    authorizationServer?: URI;
}
export interface IAuthenticationGetSessionsOptions {
    account?: AuthenticationSessionAccount;
    authorizationServer?: URI;
}
export interface AllowedExtension {
    id: string;
    name: string;
    allowed?: boolean;
    lastUsed?: number;
    trusted?: boolean;
}
export interface IAuthenticationProviderHostDelegate {
    readonly priority: number;
    create(authorizationServer: URI, serverMetadata: IAuthorizationServerMetadata, resource: IAuthorizationProtectedResourceMetadata | undefined): Promise<string>;
}
export declare function isAuthenticationSession(thing: unknown): thing is AuthenticationSession;
export interface IAuthenticationProviderSessionOptions {
    account?: AuthenticationSessionAccount;
    authorizationServer?: URI;
}
export interface IAuthenticationProvider {
    readonly id: string;
    readonly label: string;
    readonly authorizationServers?: ReadonlyArray<URI>;
    readonly supportsMultipleAccounts: boolean;
    readonly onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>;
    getSessions(scopes: string[] | undefined, options: IAuthenticationProviderSessionOptions): Promise<readonly AuthenticationSession[]>;
    createSession(scopes: string[], options: IAuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
    removeSession(sessionId: string): Promise<void>;
}
