mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 02:32:35 -05:00
Merge from vscode 718331d6f3ebd1b571530ab499edb266ddd493d5
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user