Merge from vscode 718331d6f3ebd1b571530ab499edb266ddd493d5

This commit is contained in:
ADS Merger
2020-02-08 04:50:58 +00:00
parent 8c61538a27
commit 2af13c18d2
752 changed files with 16458 additions and 10063 deletions

View File

@@ -20,12 +20,24 @@ export class MainThreadAuthenticationProvider {
public readonly displayName: string
) { }
getSessions(): Promise<ReadonlyArray<modes.Session>> {
return this._proxy.$getSessions(this.id);
async getSessions(): Promise<ReadonlyArray<modes.AuthenticationSession>> {
return (await this._proxy.$getSessions(this.id)).map(session => {
return {
id: session.id,
accountName: session.accountName,
accessToken: () => this._proxy.$getSessionAccessToken(this.id, session.id)
};
});
}
login(scopes: string[]): Promise<modes.Session> {
return this._proxy.$login(this.id, scopes);
login(scopes: string[]): Promise<modes.AuthenticationSession> {
return this._proxy.$login(this.id, scopes).then(session => {
return {
id: session.id,
accountName: session.accountName,
accessToken: () => this._proxy.$getSessionAccessToken(this.id, session.id)
};
});
}
logout(accountId: string): Promise<void> {