mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 18:22:34 -05:00
Move some files for correct code layering (#23624)
This commit is contained in:
18
src/sql/workbench/services/accountManagement/common/utils.ts
Normal file
18
src/sql/workbench/services/accountManagement/common/utils.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export const AZURE_AUTH_LIBRARY_CONFIG = 'azure.authenticationLibrary';
|
||||
|
||||
export type AuthLibrary = 'ADAL' | 'MSAL';
|
||||
export const MSAL_AUTH_LIBRARY: AuthLibrary = 'MSAL';
|
||||
export const ADAL_AUTH_LIBRARY: AuthLibrary = 'ADAL';
|
||||
|
||||
export const DEFAULT_AUTH_LIBRARY: AuthLibrary = MSAL_AUTH_LIBRARY;
|
||||
|
||||
export function getAuthLibrary(configurationService: IConfigurationService): AuthLibrary {
|
||||
return configurationService.getValue(AZURE_AUTH_LIBRARY_CONFIG) || DEFAULT_AUTH_LIBRARY;
|
||||
}
|
||||
Reference in New Issue
Block a user