Interface AuthenticationProvider

Our authentication provider should at least contain the following information:

  • The signature of authentication providers from vscode
  • Registration information about the provider (id, label)
  • Provider options (supportsMultipleAccounts)

Additionally, we provide the possibility to sign out of a specific account name.

interface AuthenticationProvider {
    id: string;
    label: string;
    onDidChangeSessions: Event<AuthenticationProviderAuthenticationSessionsChangeEvent>;
    supportsMultipleAccounts: boolean;
    createSession(scopes, options): Thenable<AuthenticationSession>;
    getSessions(scopes, account?): Thenable<readonly AuthenticationSession[]>;
    hasSessions(): boolean;
    removeSession(sessionId): Thenable<void>;
    signOut(accountName): Promise<void>;
    updateSessionItems(event): Promise<void>;
}

Properties

id: string
label: string

An event which fires when the array of sessions has changed, or data within a session has changed.

supportsMultipleAccounts: boolean

Methods