Ability to use MSAL in the Desktop (#225272)

* Ability to use MSAL in the Desktop

* add comment about MSAL workaround
This commit is contained in:
Tyler James Leonhardt
2024-08-09 12:18:34 -07:00
committed by GitHub
parent 2b8f4b8440
commit 70d27743ac
18 changed files with 1929 additions and 170 deletions

View File

@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import type { AccountInfo, AuthenticationResult, InteractiveRequest, SilentFlowRequest } from '@azure/msal-node';
import type { Disposable, Event } from 'vscode';
export interface ICachedPublicClientApplication extends Disposable {
initialize(): Promise<void>;
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult>;
acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult>;
removeAccount(account: AccountInfo): Promise<void>;
accounts: AccountInfo[];
clientId: string;
authority: string;
}
export interface ICachedPublicClientApplicationManager {
getOrCreate(clientId: string, authority: string): Promise<ICachedPublicClientApplication>;
getAll(): ICachedPublicClientApplication[];
}