@azure/identity 4.1.1-alpha.20240422.3 → 4.2.0-alpha.20240425.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @azure/identity might be problematic. Click here for more details.
- package/dist/index.js +144 -137
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalClient.js +4 -0
- package/dist-esm/src/msal/nodeFlows/msalClient.js.map +1 -1
- package/dist-esm/src/regionalAuthority.js +4 -0
- package/dist-esm/src/regionalAuthority.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var child_process__namespace = /*#__PURE__*/_interopNamespaceDefault(child_proce
|
|
|
44
44
|
/**
|
|
45
45
|
* Current version of the `@azure/identity` package.
|
|
46
46
|
*/
|
|
47
|
-
const SDK_VERSION = `4.
|
|
47
|
+
const SDK_VERSION = `4.2.0`;
|
|
48
48
|
/**
|
|
49
49
|
* The default client ID for authentication
|
|
50
50
|
* @internal
|
|
@@ -1760,6 +1760,146 @@ const imdsMsi = {
|
|
|
1760
1760
|
},
|
|
1761
1761
|
};
|
|
1762
1762
|
|
|
1763
|
+
// Copyright (c) Microsoft Corporation.
|
|
1764
|
+
// Licensed under the MIT license.
|
|
1765
|
+
/**
|
|
1766
|
+
* Helps specify a regional authority, or "AutoDiscoverRegion" to auto-detect the region.
|
|
1767
|
+
*/
|
|
1768
|
+
var RegionalAuthority;
|
|
1769
|
+
(function (RegionalAuthority) {
|
|
1770
|
+
/** Instructs MSAL to attempt to discover the region */
|
|
1771
|
+
RegionalAuthority["AutoDiscoverRegion"] = "AutoDiscoverRegion";
|
|
1772
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'westus' region. */
|
|
1773
|
+
RegionalAuthority["USWest"] = "westus";
|
|
1774
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'westus2' region. */
|
|
1775
|
+
RegionalAuthority["USWest2"] = "westus2";
|
|
1776
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'centralus' region. */
|
|
1777
|
+
RegionalAuthority["USCentral"] = "centralus";
|
|
1778
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'eastus' region. */
|
|
1779
|
+
RegionalAuthority["USEast"] = "eastus";
|
|
1780
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'eastus2' region. */
|
|
1781
|
+
RegionalAuthority["USEast2"] = "eastus2";
|
|
1782
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'northcentralus' region. */
|
|
1783
|
+
RegionalAuthority["USNorthCentral"] = "northcentralus";
|
|
1784
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'southcentralus' region. */
|
|
1785
|
+
RegionalAuthority["USSouthCentral"] = "southcentralus";
|
|
1786
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'westcentralus' region. */
|
|
1787
|
+
RegionalAuthority["USWestCentral"] = "westcentralus";
|
|
1788
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'canadacentral' region. */
|
|
1789
|
+
RegionalAuthority["CanadaCentral"] = "canadacentral";
|
|
1790
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'canadaeast' region. */
|
|
1791
|
+
RegionalAuthority["CanadaEast"] = "canadaeast";
|
|
1792
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'brazilsouth' region. */
|
|
1793
|
+
RegionalAuthority["BrazilSouth"] = "brazilsouth";
|
|
1794
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'northeurope' region. */
|
|
1795
|
+
RegionalAuthority["EuropeNorth"] = "northeurope";
|
|
1796
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'westeurope' region. */
|
|
1797
|
+
RegionalAuthority["EuropeWest"] = "westeurope";
|
|
1798
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'uksouth' region. */
|
|
1799
|
+
RegionalAuthority["UKSouth"] = "uksouth";
|
|
1800
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'ukwest' region. */
|
|
1801
|
+
RegionalAuthority["UKWest"] = "ukwest";
|
|
1802
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'francecentral' region. */
|
|
1803
|
+
RegionalAuthority["FranceCentral"] = "francecentral";
|
|
1804
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'francesouth' region. */
|
|
1805
|
+
RegionalAuthority["FranceSouth"] = "francesouth";
|
|
1806
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'switzerlandnorth' region. */
|
|
1807
|
+
RegionalAuthority["SwitzerlandNorth"] = "switzerlandnorth";
|
|
1808
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'switzerlandwest' region. */
|
|
1809
|
+
RegionalAuthority["SwitzerlandWest"] = "switzerlandwest";
|
|
1810
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'germanynorth' region. */
|
|
1811
|
+
RegionalAuthority["GermanyNorth"] = "germanynorth";
|
|
1812
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'germanywestcentral' region. */
|
|
1813
|
+
RegionalAuthority["GermanyWestCentral"] = "germanywestcentral";
|
|
1814
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'norwaywest' region. */
|
|
1815
|
+
RegionalAuthority["NorwayWest"] = "norwaywest";
|
|
1816
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'norwayeast' region. */
|
|
1817
|
+
RegionalAuthority["NorwayEast"] = "norwayeast";
|
|
1818
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'eastasia' region. */
|
|
1819
|
+
RegionalAuthority["AsiaEast"] = "eastasia";
|
|
1820
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'southeastasia' region. */
|
|
1821
|
+
RegionalAuthority["AsiaSouthEast"] = "southeastasia";
|
|
1822
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'japaneast' region. */
|
|
1823
|
+
RegionalAuthority["JapanEast"] = "japaneast";
|
|
1824
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'japanwest' region. */
|
|
1825
|
+
RegionalAuthority["JapanWest"] = "japanwest";
|
|
1826
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'australiaeast' region. */
|
|
1827
|
+
RegionalAuthority["AustraliaEast"] = "australiaeast";
|
|
1828
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'australiasoutheast' region. */
|
|
1829
|
+
RegionalAuthority["AustraliaSouthEast"] = "australiasoutheast";
|
|
1830
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'australiacentral' region. */
|
|
1831
|
+
RegionalAuthority["AustraliaCentral"] = "australiacentral";
|
|
1832
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'australiacentral2' region. */
|
|
1833
|
+
RegionalAuthority["AustraliaCentral2"] = "australiacentral2";
|
|
1834
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'centralindia' region. */
|
|
1835
|
+
RegionalAuthority["IndiaCentral"] = "centralindia";
|
|
1836
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'southindia' region. */
|
|
1837
|
+
RegionalAuthority["IndiaSouth"] = "southindia";
|
|
1838
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'westindia' region. */
|
|
1839
|
+
RegionalAuthority["IndiaWest"] = "westindia";
|
|
1840
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'koreasouth' region. */
|
|
1841
|
+
RegionalAuthority["KoreaSouth"] = "koreasouth";
|
|
1842
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'koreacentral' region. */
|
|
1843
|
+
RegionalAuthority["KoreaCentral"] = "koreacentral";
|
|
1844
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'uaecentral' region. */
|
|
1845
|
+
RegionalAuthority["UAECentral"] = "uaecentral";
|
|
1846
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'uaenorth' region. */
|
|
1847
|
+
RegionalAuthority["UAENorth"] = "uaenorth";
|
|
1848
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'southafricanorth' region. */
|
|
1849
|
+
RegionalAuthority["SouthAfricaNorth"] = "southafricanorth";
|
|
1850
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'southafricawest' region. */
|
|
1851
|
+
RegionalAuthority["SouthAfricaWest"] = "southafricawest";
|
|
1852
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'chinanorth' region. */
|
|
1853
|
+
RegionalAuthority["ChinaNorth"] = "chinanorth";
|
|
1854
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'chinaeast' region. */
|
|
1855
|
+
RegionalAuthority["ChinaEast"] = "chinaeast";
|
|
1856
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'chinanorth2' region. */
|
|
1857
|
+
RegionalAuthority["ChinaNorth2"] = "chinanorth2";
|
|
1858
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'chinaeast2' region. */
|
|
1859
|
+
RegionalAuthority["ChinaEast2"] = "chinaeast2";
|
|
1860
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'germanycentral' region. */
|
|
1861
|
+
RegionalAuthority["GermanyCentral"] = "germanycentral";
|
|
1862
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'germanynortheast' region. */
|
|
1863
|
+
RegionalAuthority["GermanyNorthEast"] = "germanynortheast";
|
|
1864
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usgovvirginia' region. */
|
|
1865
|
+
RegionalAuthority["GovernmentUSVirginia"] = "usgovvirginia";
|
|
1866
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usgoviowa' region. */
|
|
1867
|
+
RegionalAuthority["GovernmentUSIowa"] = "usgoviowa";
|
|
1868
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usgovarizona' region. */
|
|
1869
|
+
RegionalAuthority["GovernmentUSArizona"] = "usgovarizona";
|
|
1870
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usgovtexas' region. */
|
|
1871
|
+
RegionalAuthority["GovernmentUSTexas"] = "usgovtexas";
|
|
1872
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usdodeast' region. */
|
|
1873
|
+
RegionalAuthority["GovernmentUSDodEast"] = "usdodeast";
|
|
1874
|
+
/** Uses the {@link RegionalAuthority} for the Azure 'usdodcentral' region. */
|
|
1875
|
+
RegionalAuthority["GovernmentUSDodCentral"] = "usdodcentral";
|
|
1876
|
+
})(RegionalAuthority || (RegionalAuthority = {}));
|
|
1877
|
+
/**
|
|
1878
|
+
* Calculates the correct regional authority based on the supplied value
|
|
1879
|
+
* and the AZURE_REGIONAL_AUTHORITY_NAME environment variable.
|
|
1880
|
+
*
|
|
1881
|
+
* Values will be returned verbatim, except for {@link RegionalAuthority.AutoDiscoverRegion}
|
|
1882
|
+
* which is mapped to a value MSAL can understand.
|
|
1883
|
+
*
|
|
1884
|
+
* @internal
|
|
1885
|
+
*/
|
|
1886
|
+
function calculateRegionalAuthority(regionalAuthority) {
|
|
1887
|
+
// Note: as of today only 3 credentials support regional authority, and the parameter
|
|
1888
|
+
// is not exposed via the public API. Regional Authority is _only_ supported
|
|
1889
|
+
// via the AZURE_REGIONAL_AUTHORITY_NAME env var and _only_ for: ClientSecretCredential, ClientCertificateCredential, and ClientAssertionCredential.
|
|
1890
|
+
var _a, _b;
|
|
1891
|
+
// Accepting the regionalAuthority parameter will allow us to support it in the future.
|
|
1892
|
+
let azureRegion = regionalAuthority;
|
|
1893
|
+
if (azureRegion === undefined &&
|
|
1894
|
+
((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.AZURE_REGIONAL_AUTHORITY_NAME) !== undefined) {
|
|
1895
|
+
azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;
|
|
1896
|
+
}
|
|
1897
|
+
if (azureRegion === RegionalAuthority.AutoDiscoverRegion) {
|
|
1898
|
+
return "AUTO_DISCOVER";
|
|
1899
|
+
}
|
|
1900
|
+
return azureRegion;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1763
1903
|
// Copyright (c) Microsoft Corporation.
|
|
1764
1904
|
// Licensed under the MIT license.
|
|
1765
1905
|
/**
|
|
@@ -1922,6 +2062,7 @@ To work with multiple accounts for the same Client ID and Tenant ID, please prov
|
|
|
1922
2062
|
return withSilentAuthentication(msalApp, scopes, options, () => msalApp.acquireTokenByClientCredential({
|
|
1923
2063
|
scopes,
|
|
1924
2064
|
authority: state.msalConfig.auth.authority,
|
|
2065
|
+
azureRegion: calculateRegionalAuthority(),
|
|
1925
2066
|
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
1926
2067
|
}));
|
|
1927
2068
|
}
|
|
@@ -1932,6 +2073,7 @@ To work with multiple accounts for the same Client ID and Tenant ID, please prov
|
|
|
1932
2073
|
return withSilentAuthentication(msalApp, scopes, options, () => msalApp.acquireTokenByClientCredential({
|
|
1933
2074
|
scopes,
|
|
1934
2075
|
authority: state.msalConfig.auth.authority,
|
|
2076
|
+
azureRegion: calculateRegionalAuthority(),
|
|
1935
2077
|
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
1936
2078
|
clientAssertion,
|
|
1937
2079
|
}));
|
|
@@ -1942,6 +2084,7 @@ To work with multiple accounts for the same Client ID and Tenant ID, please prov
|
|
|
1942
2084
|
const msalApp = await getConfidentialApp(options);
|
|
1943
2085
|
return withSilentAuthentication(msalApp, scopes, options, () => msalApp.acquireTokenByClientCredential({
|
|
1944
2086
|
scopes,
|
|
2087
|
+
azureRegion: calculateRegionalAuthority(),
|
|
1945
2088
|
authority: state.msalConfig.auth.authority,
|
|
1946
2089
|
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
1947
2090
|
}));
|
|
@@ -3226,142 +3369,6 @@ class ClientSecretCredential {
|
|
|
3226
3369
|
}
|
|
3227
3370
|
}
|
|
3228
3371
|
|
|
3229
|
-
// Copyright (c) Microsoft Corporation.
|
|
3230
|
-
// Licensed under the MIT license.
|
|
3231
|
-
/**
|
|
3232
|
-
* Helps specify a regional authority, or "AutoDiscoverRegion" to auto-detect the region.
|
|
3233
|
-
*/
|
|
3234
|
-
var RegionalAuthority;
|
|
3235
|
-
(function (RegionalAuthority) {
|
|
3236
|
-
/** Instructs MSAL to attempt to discover the region */
|
|
3237
|
-
RegionalAuthority["AutoDiscoverRegion"] = "AutoDiscoverRegion";
|
|
3238
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'westus' region. */
|
|
3239
|
-
RegionalAuthority["USWest"] = "westus";
|
|
3240
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'westus2' region. */
|
|
3241
|
-
RegionalAuthority["USWest2"] = "westus2";
|
|
3242
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'centralus' region. */
|
|
3243
|
-
RegionalAuthority["USCentral"] = "centralus";
|
|
3244
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'eastus' region. */
|
|
3245
|
-
RegionalAuthority["USEast"] = "eastus";
|
|
3246
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'eastus2' region. */
|
|
3247
|
-
RegionalAuthority["USEast2"] = "eastus2";
|
|
3248
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'northcentralus' region. */
|
|
3249
|
-
RegionalAuthority["USNorthCentral"] = "northcentralus";
|
|
3250
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'southcentralus' region. */
|
|
3251
|
-
RegionalAuthority["USSouthCentral"] = "southcentralus";
|
|
3252
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'westcentralus' region. */
|
|
3253
|
-
RegionalAuthority["USWestCentral"] = "westcentralus";
|
|
3254
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'canadacentral' region. */
|
|
3255
|
-
RegionalAuthority["CanadaCentral"] = "canadacentral";
|
|
3256
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'canadaeast' region. */
|
|
3257
|
-
RegionalAuthority["CanadaEast"] = "canadaeast";
|
|
3258
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'brazilsouth' region. */
|
|
3259
|
-
RegionalAuthority["BrazilSouth"] = "brazilsouth";
|
|
3260
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'northeurope' region. */
|
|
3261
|
-
RegionalAuthority["EuropeNorth"] = "northeurope";
|
|
3262
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'westeurope' region. */
|
|
3263
|
-
RegionalAuthority["EuropeWest"] = "westeurope";
|
|
3264
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'uksouth' region. */
|
|
3265
|
-
RegionalAuthority["UKSouth"] = "uksouth";
|
|
3266
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'ukwest' region. */
|
|
3267
|
-
RegionalAuthority["UKWest"] = "ukwest";
|
|
3268
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'francecentral' region. */
|
|
3269
|
-
RegionalAuthority["FranceCentral"] = "francecentral";
|
|
3270
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'francesouth' region. */
|
|
3271
|
-
RegionalAuthority["FranceSouth"] = "francesouth";
|
|
3272
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'switzerlandnorth' region. */
|
|
3273
|
-
RegionalAuthority["SwitzerlandNorth"] = "switzerlandnorth";
|
|
3274
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'switzerlandwest' region. */
|
|
3275
|
-
RegionalAuthority["SwitzerlandWest"] = "switzerlandwest";
|
|
3276
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'germanynorth' region. */
|
|
3277
|
-
RegionalAuthority["GermanyNorth"] = "germanynorth";
|
|
3278
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'germanywestcentral' region. */
|
|
3279
|
-
RegionalAuthority["GermanyWestCentral"] = "germanywestcentral";
|
|
3280
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'norwaywest' region. */
|
|
3281
|
-
RegionalAuthority["NorwayWest"] = "norwaywest";
|
|
3282
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'norwayeast' region. */
|
|
3283
|
-
RegionalAuthority["NorwayEast"] = "norwayeast";
|
|
3284
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'eastasia' region. */
|
|
3285
|
-
RegionalAuthority["AsiaEast"] = "eastasia";
|
|
3286
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'southeastasia' region. */
|
|
3287
|
-
RegionalAuthority["AsiaSouthEast"] = "southeastasia";
|
|
3288
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'japaneast' region. */
|
|
3289
|
-
RegionalAuthority["JapanEast"] = "japaneast";
|
|
3290
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'japanwest' region. */
|
|
3291
|
-
RegionalAuthority["JapanWest"] = "japanwest";
|
|
3292
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'australiaeast' region. */
|
|
3293
|
-
RegionalAuthority["AustraliaEast"] = "australiaeast";
|
|
3294
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'australiasoutheast' region. */
|
|
3295
|
-
RegionalAuthority["AustraliaSouthEast"] = "australiasoutheast";
|
|
3296
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'australiacentral' region. */
|
|
3297
|
-
RegionalAuthority["AustraliaCentral"] = "australiacentral";
|
|
3298
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'australiacentral2' region. */
|
|
3299
|
-
RegionalAuthority["AustraliaCentral2"] = "australiacentral2";
|
|
3300
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'centralindia' region. */
|
|
3301
|
-
RegionalAuthority["IndiaCentral"] = "centralindia";
|
|
3302
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'southindia' region. */
|
|
3303
|
-
RegionalAuthority["IndiaSouth"] = "southindia";
|
|
3304
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'westindia' region. */
|
|
3305
|
-
RegionalAuthority["IndiaWest"] = "westindia";
|
|
3306
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'koreasouth' region. */
|
|
3307
|
-
RegionalAuthority["KoreaSouth"] = "koreasouth";
|
|
3308
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'koreacentral' region. */
|
|
3309
|
-
RegionalAuthority["KoreaCentral"] = "koreacentral";
|
|
3310
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'uaecentral' region. */
|
|
3311
|
-
RegionalAuthority["UAECentral"] = "uaecentral";
|
|
3312
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'uaenorth' region. */
|
|
3313
|
-
RegionalAuthority["UAENorth"] = "uaenorth";
|
|
3314
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'southafricanorth' region. */
|
|
3315
|
-
RegionalAuthority["SouthAfricaNorth"] = "southafricanorth";
|
|
3316
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'southafricawest' region. */
|
|
3317
|
-
RegionalAuthority["SouthAfricaWest"] = "southafricawest";
|
|
3318
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'chinanorth' region. */
|
|
3319
|
-
RegionalAuthority["ChinaNorth"] = "chinanorth";
|
|
3320
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'chinaeast' region. */
|
|
3321
|
-
RegionalAuthority["ChinaEast"] = "chinaeast";
|
|
3322
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'chinanorth2' region. */
|
|
3323
|
-
RegionalAuthority["ChinaNorth2"] = "chinanorth2";
|
|
3324
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'chinaeast2' region. */
|
|
3325
|
-
RegionalAuthority["ChinaEast2"] = "chinaeast2";
|
|
3326
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'germanycentral' region. */
|
|
3327
|
-
RegionalAuthority["GermanyCentral"] = "germanycentral";
|
|
3328
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'germanynortheast' region. */
|
|
3329
|
-
RegionalAuthority["GermanyNorthEast"] = "germanynortheast";
|
|
3330
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usgovvirginia' region. */
|
|
3331
|
-
RegionalAuthority["GovernmentUSVirginia"] = "usgovvirginia";
|
|
3332
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usgoviowa' region. */
|
|
3333
|
-
RegionalAuthority["GovernmentUSIowa"] = "usgoviowa";
|
|
3334
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usgovarizona' region. */
|
|
3335
|
-
RegionalAuthority["GovernmentUSArizona"] = "usgovarizona";
|
|
3336
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usgovtexas' region. */
|
|
3337
|
-
RegionalAuthority["GovernmentUSTexas"] = "usgovtexas";
|
|
3338
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usdodeast' region. */
|
|
3339
|
-
RegionalAuthority["GovernmentUSDodEast"] = "usdodeast";
|
|
3340
|
-
/** Uses the {@link RegionalAuthority} for the Azure 'usdodcentral' region. */
|
|
3341
|
-
RegionalAuthority["GovernmentUSDodCentral"] = "usdodcentral";
|
|
3342
|
-
})(RegionalAuthority || (RegionalAuthority = {}));
|
|
3343
|
-
/**
|
|
3344
|
-
* Calculates the correct regional authority based on the supplied value
|
|
3345
|
-
* and the AZURE_REGIONAL_AUTHORITY_NAME environment variable.
|
|
3346
|
-
*
|
|
3347
|
-
* Values will be returned verbatim, except for {@link RegionalAuthority.AutoDiscoverRegion}
|
|
3348
|
-
* which is mapped to a value MSAL can understand.
|
|
3349
|
-
*
|
|
3350
|
-
* @internal
|
|
3351
|
-
*/
|
|
3352
|
-
function calculateRegionalAuthority(regionalAuthority) {
|
|
3353
|
-
var _a, _b;
|
|
3354
|
-
let azureRegion = regionalAuthority;
|
|
3355
|
-
if (azureRegion === undefined &&
|
|
3356
|
-
((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.AZURE_REGIONAL_AUTHORITY_NAME) !== undefined) {
|
|
3357
|
-
azureRegion = process.env.AZURE_REGIONAL_AUTHORITY_NAME;
|
|
3358
|
-
}
|
|
3359
|
-
if (azureRegion === RegionalAuthority.AutoDiscoverRegion) {
|
|
3360
|
-
return "AUTO_DISCOVER";
|
|
3361
|
-
}
|
|
3362
|
-
return azureRegion;
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
3372
|
// Copyright (c) Microsoft Corporation.
|
|
3366
3373
|
// Licensed under the MIT license.
|
|
3367
3374
|
/**
|