Expose functions under authentication namespace instead of providers array, #88309

This commit is contained in:
Rachel Macfarlane
2020-03-06 12:44:50 -08:00
parent 223a90d3b3
commit 6f230c5f04
3 changed files with 71 additions and 49 deletions

View File

@@ -185,12 +185,21 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
registerAuthenticationProvider(provider: vscode.AuthenticationProvider): vscode.Disposable {
return extHostAuthentication.registerAuthenticationProvider(provider);
},
get providers() {
return extHostAuthentication.providers(extension);
},
get onDidChangeAuthenticationProviders(): Event<vscode.AuthenticationProvidersChangeEvent> {
return extHostAuthentication.onDidChangeAuthenticationProviders;
}
},
hasProvider(providerId: string): boolean {
return extHostAuthentication.hasProvider(providerId);
},
getSessions(providerId: string): Thenable<readonly vscode.AuthenticationSession[]> {
return extHostAuthentication.getSessions(extension, providerId);
},
login(providerId: string, scopes: string[]): Thenable<vscode.AuthenticationSession> {
return extHostAuthentication.login(extension, providerId, scopes);
},
get onDidChangeSessions(): Event<string[]> {
return extHostAuthentication.onDidChangeSessions;
},
};
// namespace: commands