Initial getSessions API (#177036)

* Initial getSessions API

ref https://github.com/microsoft/vscode/issues/152399

* include provider id in key
This commit is contained in:
Tyler James Leonhardt
2023-03-14 10:20:13 -07:00
committed by GitHub
parent 8306fcbca1
commit 4129a034ed
6 changed files with 84 additions and 47 deletions

View File

@@ -247,6 +247,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
},
getSessions(providerId: string, scopes: readonly string[]) {
checkProposedApiEnabled(extension, 'getSessions');
return extHostAuthentication.getSessions(extension, providerId, scopes);
},
// TODO: remove this after GHPR and Codespaces move off of it
async hasSession(providerId: string, scopes: readonly string[]) {
checkProposedApiEnabled(extension, 'authSession');