mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 (#9385)
* Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 * distro
This commit is contained in:
@@ -16,7 +16,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
await loginService.initialize();
|
||||
|
||||
vscode.authentication.registerAuthenticationProvider({
|
||||
id: 'GitHub',
|
||||
id: 'github',
|
||||
displayName: 'GitHub',
|
||||
onDidChangeSessions: onDidChangeSessions.event,
|
||||
getSessions: () => Promise.resolve(loginService.sessions),
|
||||
|
||||
@@ -71,7 +71,7 @@ export class GitHubAuthenticationProvider {
|
||||
id: session.id,
|
||||
accountName: session.accountName,
|
||||
scopes: session.scopes,
|
||||
accessToken: () => Promise.resolve(session.accessToken)
|
||||
getAccessToken: () => Promise.resolve(session.accessToken)
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -84,7 +84,7 @@ export class GitHubAuthenticationProvider {
|
||||
|
||||
private async storeSessions(): Promise<void> {
|
||||
const sessionData: SessionData[] = await Promise.all(this._sessions.map(async session => {
|
||||
const resolvedAccessToken = await session.accessToken();
|
||||
const resolvedAccessToken = await session.getAccessToken();
|
||||
return {
|
||||
id: session.id,
|
||||
accountName: session.accountName,
|
||||
@@ -111,7 +111,7 @@ export class GitHubAuthenticationProvider {
|
||||
const userInfo = await this._githubServer.getUserInfo(token);
|
||||
return {
|
||||
id: userInfo.id,
|
||||
accessToken: () => Promise.resolve(token),
|
||||
getAccessToken: () => Promise.resolve(token),
|
||||
accountName: userInfo.accountName,
|
||||
scopes: scopes
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user