mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Cache access tokens in local cache file to prevent MSAL throttling (#22763)
This commit is contained in:
@@ -136,10 +136,29 @@ export function getResourceTypeDisplayName(type: string): string {
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
function getHttpConfiguration(): vscode.WorkspaceConfiguration {
|
||||
return vscode.workspace.getConfiguration(constants.httpConfigSectionName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tenants to be ignored.
|
||||
* @returns Tenants configured in ignore list
|
||||
*/
|
||||
export function getTenantIgnoreList(): string[] {
|
||||
const configuration = vscode.workspace.getConfiguration(constants.AzureTenantConfigSection);
|
||||
return configuration.get(constants.Filter) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates tenant ignore list in global settings.
|
||||
* @param tenantIgnoreList Tenants to be configured in ignore list
|
||||
*/
|
||||
export async function updateTenantIgnoreList(tenantIgnoreList: string[]): Promise<void> {
|
||||
const configuration = vscode.workspace.getConfiguration(constants.AzureTenantConfigSection);
|
||||
await configuration.update(constants.Filter, tenantIgnoreList, vscode.ConfigurationTarget.Global);
|
||||
}
|
||||
|
||||
export function getResourceTypeIcon(appContext: AppContext, type: string): string {
|
||||
switch (type) {
|
||||
case azureResource.AzureResourceType.sqlServer:
|
||||
|
||||
Reference in New Issue
Block a user