Add providerId array to authentication namespace

This commit is contained in:
Rachel Macfarlane
2020-03-09 13:59:56 -07:00
parent 2b029679b5
commit cfc1ab4c5f
3 changed files with 11 additions and 6 deletions

View File

@@ -24,8 +24,13 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
this._proxy = mainContext.getProxy(MainContext.MainThreadAuthentication);
}
hasProvider(providerId: string): boolean {
return !!this._authenticationProviders.get(providerId);
get providerIds(): string[] {
const ids: string[] = [];
this._authenticationProviders.forEach(provider => {
ids.push(provider.id);
});
return ids;
}
async getSessions(requestingExtension: IExtensionDescription, providerId: string, scopes: string[]): Promise<readonly vscode.AuthenticationSession[]> {