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

@@ -5,7 +5,7 @@
import { Emitter, Event } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { Session } from 'vs/editor/common/modes';
import { AuthenticationSession } from 'vs/editor/common/modes';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { MainThreadAuthenticationProvider } from 'vs/workbench/api/browser/mainThreadAuthentication';
@@ -23,9 +23,9 @@ export interface IAuthenticationService {
readonly onDidUnregisterAuthenticationProvider: Event<string>;
readonly onDidChangeSessions: Event<string>;
getSessions(providerId: string): Promise<ReadonlyArray<Session> | undefined>;
getSessions(providerId: string): Promise<ReadonlyArray<AuthenticationSession> | undefined>;
getDisplayName(providerId: string): string;
login(providerId: string, scopes: string[]): Promise<Session>;
login(providerId: string, scopes: string[]): Promise<AuthenticationSession>;
logout(providerId: string, accountId: string): Promise<void>;
}
@@ -70,7 +70,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
}
}
async getSessions(id: string): Promise<ReadonlyArray<Session> | undefined> {
async getSessions(id: string): Promise<ReadonlyArray<AuthenticationSession> | undefined> {
const authProvider = this._authenticationProviders.get(id);
if (authProvider) {
return await authProvider.getSessions();
@@ -79,7 +79,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
return undefined;
}
async login(id: string, scopes: string[]): Promise<Session> {
async login(id: string, scopes: string[]): Promise<AuthenticationSession> {
const authProvider = this._authenticationProviders.get(id);
if (authProvider) {
return authProvider.login(scopes);