mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
proposed api for an idToken on AuthenticationSession. ref #140929
This commit is contained in:
@@ -16,7 +16,6 @@ import { toBase64UrlEncoding } from './utils';
|
||||
import fetch, { Response } from 'node-fetch';
|
||||
import { sha256 } from './env/node/sha256';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { MicrosoftAuthenticationSession } from './microsoft-authentication';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -272,7 +271,7 @@ export class AzureActiveDirectoryService {
|
||||
* Return a session object without checking for expiry and potentially refreshing.
|
||||
* @param token The token information.
|
||||
*/
|
||||
private convertToSessionSync(token: IToken): MicrosoftAuthenticationSession {
|
||||
private convertToSessionSync(token: IToken): vscode.AuthenticationSession {
|
||||
return {
|
||||
id: token.sessionId,
|
||||
accessToken: token.accessToken!,
|
||||
@@ -282,7 +281,7 @@ export class AzureActiveDirectoryService {
|
||||
};
|
||||
}
|
||||
|
||||
private async convertToSession(token: IToken): Promise<MicrosoftAuthenticationSession> {
|
||||
private async convertToSession(token: IToken): Promise<vscode.AuthenticationSession> {
|
||||
const resolvedTokens = await this.resolveAccessAndIdTokens(token);
|
||||
return {
|
||||
id: token.sessionId,
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { AuthenticationSession } from 'vscode';
|
||||
|
||||
/**
|
||||
* Represents a session of a currently logged in Microsoft user.
|
||||
*/
|
||||
export interface MicrosoftAuthenticationSession extends AuthenticationSession {
|
||||
/**
|
||||
* The id token.
|
||||
*/
|
||||
idToken?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user