Make scopes parameter optional to getSessions and remove getAllSessions

This commit is contained in:
Rachel Macfarlane
2021-02-12 09:05:31 -08:00
parent a16f5d2c4c
commit 14669c2e45
13 changed files with 27 additions and 51 deletions

View File

@@ -147,16 +147,7 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
throw new Error(`Unable to find authentication provider with handle: ${providerId}`);
}
$getAllSessions(providerId: string): Promise<ReadonlyArray<modes.AuthenticationSession>> {
const providerData = this._authenticationProviders.get(providerId);
if (providerData) {
return Promise.resolve(providerData.provider.getAllSessions());
}
throw new Error(`Unable to find authentication provider with handle: ${providerId}`);
}
$getSessions(providerId: string, scopes: string[]): Promise<ReadonlyArray<modes.AuthenticationSession>> {
$getSessions(providerId: string, scopes?: string[]): Promise<ReadonlyArray<modes.AuthenticationSession>> {
const providerData = this._authenticationProviders.get(providerId);
if (providerData) {
return Promise.resolve(providerData.provider.getSessions(scopes));