@azure/msal-browser 4.0.1 → 4.0.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.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +4 -2
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +1 -6
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +25 -26
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts +2 -0
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +26 -12
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +1 -2
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +8 -6
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +127 -119
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +127 -119
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +59 -59
- package/lib/types/app/PublicClientApplication.d.ts.map +1 -1
- package/lib/types/cache/BrowserCacheManager.d.ts +1 -6
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/controllers/NestedAppAuthController.d.ts +2 -0
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts +1 -2
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +2 -2
- package/src/app/PublicClientApplication.ts +6 -1
- package/src/cache/BrowserCacheManager.ts +37 -32
- package/src/controllers/NestedAppAuthController.ts +36 -16
- package/src/interaction_client/NativeInteractionClient.ts +11 -12
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.0.
|
|
1
|
+
/*! @azure/msal-browser v4.0.2 2025-01-22 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v15.0.
|
|
9
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
// Token renewal offset default in seconds
|
|
311
311
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
312
312
|
|
|
313
|
-
/*! @azure/msal-common v15.0.
|
|
313
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
314
314
|
/*
|
|
315
315
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
316
316
|
* Licensed under the MIT License.
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
unexpectedError: unexpectedError
|
|
328
328
|
});
|
|
329
329
|
|
|
330
|
-
/*! @azure/msal-common v15.0.
|
|
330
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
331
331
|
|
|
332
332
|
/*
|
|
333
333
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
: AuthErrorMessages[code]);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
/*! @azure/msal-common v15.0.
|
|
379
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
380
380
|
/*
|
|
381
381
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
382
382
|
* Licensed under the MIT License.
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
userTimeoutReached: userTimeoutReached
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
/*! @azure/msal-common v15.0.
|
|
477
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
478
478
|
|
|
479
479
|
/*
|
|
480
480
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
/*! @azure/msal-common v15.0.
|
|
729
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
730
730
|
|
|
731
731
|
/*
|
|
732
732
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
},
|
|
766
766
|
};
|
|
767
767
|
|
|
768
|
-
/*! @azure/msal-common v15.0.
|
|
768
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
769
769
|
|
|
770
770
|
/*
|
|
771
771
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -956,12 +956,12 @@
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
|
|
959
|
-
/*! @azure/msal-common v15.0.
|
|
959
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
960
960
|
/* eslint-disable header/header */
|
|
961
961
|
const name$1 = "@azure/msal-common";
|
|
962
|
-
const version$1 = "15.0.
|
|
962
|
+
const version$1 = "15.0.2";
|
|
963
963
|
|
|
964
|
-
/*! @azure/msal-common v15.0.
|
|
964
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
965
965
|
/*
|
|
966
966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
967
967
|
* Licensed under the MIT License.
|
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
982
982
|
};
|
|
983
983
|
|
|
984
|
-
/*! @azure/msal-common v15.0.
|
|
984
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
985
985
|
|
|
986
986
|
/*
|
|
987
987
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
|
-
/*! @azure/msal-common v15.0.
|
|
1045
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1046
1046
|
/*
|
|
1047
1047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1048
1048
|
* Licensed under the MIT License.
|
|
@@ -1079,7 +1079,7 @@
|
|
|
1079
1079
|
return cachedAtSec > nowSeconds();
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
-
/*! @azure/msal-common v15.0.
|
|
1082
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1083
1083
|
|
|
1084
1084
|
/*
|
|
1085
1085
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1406,7 +1406,7 @@
|
|
|
1406
1406
|
return metadata.expiresAt <= nowSeconds();
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
|
-
/*! @azure/msal-common v15.0.
|
|
1409
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1410
1410
|
/*
|
|
1411
1411
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1412
1412
|
* Licensed under the MIT License.
|
|
@@ -1460,7 +1460,7 @@
|
|
|
1460
1460
|
urlParseError: urlParseError
|
|
1461
1461
|
});
|
|
1462
1462
|
|
|
1463
|
-
/*! @azure/msal-common v15.0.
|
|
1463
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1464
1464
|
|
|
1465
1465
|
/*
|
|
1466
1466
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1598,7 +1598,7 @@
|
|
|
1598
1598
|
return new ClientConfigurationError(errorCode);
|
|
1599
1599
|
}
|
|
1600
1600
|
|
|
1601
|
-
/*! @azure/msal-common v15.0.
|
|
1601
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1602
1602
|
/*
|
|
1603
1603
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1604
1604
|
* Licensed under the MIT License.
|
|
@@ -1695,7 +1695,7 @@
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
|
|
1698
|
-
/*! @azure/msal-common v15.0.
|
|
1698
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1699
1699
|
|
|
1700
1700
|
/*
|
|
1701
1701
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1715,8 +1715,10 @@
|
|
|
1715
1715
|
const filteredInput = scopeArr
|
|
1716
1716
|
? StringUtils.removeEmptyStringsFromArray(scopeArr)
|
|
1717
1717
|
: [];
|
|
1718
|
-
//
|
|
1719
|
-
|
|
1718
|
+
// Check if scopes array has at least one member
|
|
1719
|
+
if (!filteredInput || !filteredInput.length) {
|
|
1720
|
+
throw createClientConfigurationError(emptyInputScopesError);
|
|
1721
|
+
}
|
|
1720
1722
|
this.scopes = new Set(); // Iterator in constructor not supported by IE11
|
|
1721
1723
|
filteredInput.forEach((scope) => this.scopes.add(scope));
|
|
1722
1724
|
}
|
|
@@ -1746,17 +1748,6 @@
|
|
|
1746
1748
|
}
|
|
1747
1749
|
return scopeSet;
|
|
1748
1750
|
}
|
|
1749
|
-
/**
|
|
1750
|
-
* Used to validate the scopes input parameter requested by the developer.
|
|
1751
|
-
* @param {Array<string>} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.
|
|
1752
|
-
* @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not
|
|
1753
|
-
*/
|
|
1754
|
-
validateInputScopes(inputScopes) {
|
|
1755
|
-
// Check if scopes are required but not given or is an empty array
|
|
1756
|
-
if (!inputScopes || inputScopes.length < 1) {
|
|
1757
|
-
throw createClientConfigurationError(emptyInputScopesError);
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
1751
|
/**
|
|
1761
1752
|
* Check if a given scope is present in this set of scopes.
|
|
1762
1753
|
* @param scope
|
|
@@ -1895,7 +1886,7 @@
|
|
|
1895
1886
|
}
|
|
1896
1887
|
}
|
|
1897
1888
|
|
|
1898
|
-
/*! @azure/msal-common v15.0.
|
|
1889
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1899
1890
|
|
|
1900
1891
|
/*
|
|
1901
1892
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1935,7 +1926,7 @@
|
|
|
1935
1926
|
};
|
|
1936
1927
|
}
|
|
1937
1928
|
|
|
1938
|
-
/*! @azure/msal-common v15.0.
|
|
1929
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
1939
1930
|
/*
|
|
1940
1931
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1941
1932
|
* Licensed under the MIT License.
|
|
@@ -2014,7 +2005,7 @@
|
|
|
2014
2005
|
return updatedAccountInfo;
|
|
2015
2006
|
}
|
|
2016
2007
|
|
|
2017
|
-
/*! @azure/msal-common v15.0.
|
|
2008
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2018
2009
|
/*
|
|
2019
2010
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2020
2011
|
* Licensed under the MIT License.
|
|
@@ -2029,7 +2020,7 @@
|
|
|
2029
2020
|
Ciam: 3,
|
|
2030
2021
|
};
|
|
2031
2022
|
|
|
2032
|
-
/*! @azure/msal-common v15.0.
|
|
2023
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2033
2024
|
/*
|
|
2034
2025
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2035
2026
|
* Licensed under the MIT License.
|
|
@@ -2051,7 +2042,7 @@
|
|
|
2051
2042
|
return null;
|
|
2052
2043
|
}
|
|
2053
2044
|
|
|
2054
|
-
/*! @azure/msal-common v15.0.
|
|
2045
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2055
2046
|
/*
|
|
2056
2047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2057
2048
|
* Licensed under the MIT License.
|
|
@@ -2064,7 +2055,7 @@
|
|
|
2064
2055
|
OIDC: "OIDC",
|
|
2065
2056
|
};
|
|
2066
2057
|
|
|
2067
|
-
/*! @azure/msal-common v15.0.
|
|
2058
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2068
2059
|
|
|
2069
2060
|
/*
|
|
2070
2061
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2307,7 +2298,7 @@
|
|
|
2307
2298
|
}
|
|
2308
2299
|
}
|
|
2309
2300
|
|
|
2310
|
-
/*! @azure/msal-common v15.0.
|
|
2301
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2311
2302
|
|
|
2312
2303
|
/*
|
|
2313
2304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2354,7 +2345,7 @@
|
|
|
2354
2345
|
return null;
|
|
2355
2346
|
}
|
|
2356
2347
|
|
|
2357
|
-
/*! @azure/msal-common v15.0.
|
|
2348
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2358
2349
|
|
|
2359
2350
|
/*
|
|
2360
2351
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2518,7 +2509,7 @@
|
|
|
2518
2509
|
}
|
|
2519
2510
|
}
|
|
2520
2511
|
|
|
2521
|
-
/*! @azure/msal-common v15.0.
|
|
2512
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2522
2513
|
|
|
2523
2514
|
/*
|
|
2524
2515
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2658,7 +2649,7 @@
|
|
|
2658
2649
|
return null;
|
|
2659
2650
|
}
|
|
2660
2651
|
|
|
2661
|
-
/*! @azure/msal-common v15.0.
|
|
2652
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2662
2653
|
/*
|
|
2663
2654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2664
2655
|
* Licensed under the MIT License.
|
|
@@ -2666,7 +2657,7 @@
|
|
|
2666
2657
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
2667
2658
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
2668
2659
|
|
|
2669
|
-
/*! @azure/msal-common v15.0.
|
|
2660
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2670
2661
|
|
|
2671
2662
|
/*
|
|
2672
2663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2693,7 +2684,7 @@
|
|
|
2693
2684
|
}
|
|
2694
2685
|
}
|
|
2695
2686
|
|
|
2696
|
-
/*! @azure/msal-common v15.0.
|
|
2687
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
2697
2688
|
|
|
2698
2689
|
/*
|
|
2699
2690
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3878,7 +3869,7 @@
|
|
|
3878
3869
|
}
|
|
3879
3870
|
}
|
|
3880
3871
|
|
|
3881
|
-
/*! @azure/msal-common v15.0.
|
|
3872
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
3882
3873
|
|
|
3883
3874
|
/*
|
|
3884
3875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3977,7 +3968,7 @@
|
|
|
3977
3968
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
3978
3969
|
}
|
|
3979
3970
|
|
|
3980
|
-
/*! @azure/msal-common v15.0.
|
|
3971
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
3981
3972
|
/*
|
|
3982
3973
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3983
3974
|
* Licensed under the MIT License.
|
|
@@ -3987,7 +3978,7 @@
|
|
|
3987
3978
|
UPN: "UPN",
|
|
3988
3979
|
};
|
|
3989
3980
|
|
|
3990
|
-
/*! @azure/msal-common v15.0.
|
|
3981
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
3991
3982
|
/*
|
|
3992
3983
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3993
3984
|
* Licensed under the MIT License.
|
|
@@ -4037,7 +4028,7 @@
|
|
|
4037
4028
|
const BROKER_CLIENT_ID = "brk_client_id";
|
|
4038
4029
|
const BROKER_REDIRECT_URI = "brk_redirect_uri";
|
|
4039
4030
|
|
|
4040
|
-
/*! @azure/msal-common v15.0.
|
|
4031
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4041
4032
|
|
|
4042
4033
|
/*
|
|
4043
4034
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4104,7 +4095,7 @@
|
|
|
4104
4095
|
}
|
|
4105
4096
|
}
|
|
4106
4097
|
|
|
4107
|
-
/*! @azure/msal-common v15.0.
|
|
4098
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4108
4099
|
|
|
4109
4100
|
/*
|
|
4110
4101
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4512,7 +4503,7 @@
|
|
|
4512
4503
|
}
|
|
4513
4504
|
}
|
|
4514
4505
|
|
|
4515
|
-
/*! @azure/msal-common v15.0.
|
|
4506
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4516
4507
|
/*
|
|
4517
4508
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4518
4509
|
* Licensed under the MIT License.
|
|
@@ -4524,7 +4515,7 @@
|
|
|
4524
4515
|
response.hasOwnProperty("jwks_uri"));
|
|
4525
4516
|
}
|
|
4526
4517
|
|
|
4527
|
-
/*! @azure/msal-common v15.0.
|
|
4518
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4528
4519
|
/*
|
|
4529
4520
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4530
4521
|
* Licensed under the MIT License.
|
|
@@ -4534,7 +4525,7 @@
|
|
|
4534
4525
|
response.hasOwnProperty("metadata"));
|
|
4535
4526
|
}
|
|
4536
4527
|
|
|
4537
|
-
/*! @azure/msal-common v15.0.
|
|
4528
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4538
4529
|
/*
|
|
4539
4530
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4540
4531
|
* Licensed under the MIT License.
|
|
@@ -4544,7 +4535,7 @@
|
|
|
4544
4535
|
response.hasOwnProperty("error_description"));
|
|
4545
4536
|
}
|
|
4546
4537
|
|
|
4547
|
-
/*! @azure/msal-common v15.0.
|
|
4538
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
4548
4539
|
/*
|
|
4549
4540
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4550
4541
|
* Licensed under the MIT License.
|
|
@@ -5051,7 +5042,7 @@
|
|
|
5051
5042
|
"encryptedCacheExpiredCount",
|
|
5052
5043
|
]);
|
|
5053
5044
|
|
|
5054
|
-
/*! @azure/msal-common v15.0.
|
|
5045
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
5055
5046
|
/*
|
|
5056
5047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5057
5048
|
* Licensed under the MIT License.
|
|
@@ -5147,7 +5138,7 @@
|
|
|
5147
5138
|
};
|
|
5148
5139
|
};
|
|
5149
5140
|
|
|
5150
|
-
/*! @azure/msal-common v15.0.
|
|
5141
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
5151
5142
|
|
|
5152
5143
|
/*
|
|
5153
5144
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5256,7 +5247,7 @@
|
|
|
5256
5247
|
},
|
|
5257
5248
|
};
|
|
5258
5249
|
|
|
5259
|
-
/*! @azure/msal-common v15.0.
|
|
5250
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
5260
5251
|
|
|
5261
5252
|
/*
|
|
5262
5253
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6095,7 +6086,7 @@
|
|
|
6095
6086
|
};
|
|
6096
6087
|
}
|
|
6097
6088
|
|
|
6098
|
-
/*! @azure/msal-common v15.0.
|
|
6089
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6099
6090
|
|
|
6100
6091
|
/*
|
|
6101
6092
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6126,7 +6117,7 @@
|
|
|
6126
6117
|
}
|
|
6127
6118
|
}
|
|
6128
6119
|
|
|
6129
|
-
/*! @azure/msal-common v15.0.
|
|
6120
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6130
6121
|
|
|
6131
6122
|
/*
|
|
6132
6123
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6145,7 +6136,7 @@
|
|
|
6145
6136
|
}
|
|
6146
6137
|
}
|
|
6147
6138
|
|
|
6148
|
-
/*! @azure/msal-common v15.0.
|
|
6139
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6149
6140
|
|
|
6150
6141
|
/*
|
|
6151
6142
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6243,7 +6234,7 @@
|
|
|
6243
6234
|
}
|
|
6244
6235
|
}
|
|
6245
6236
|
|
|
6246
|
-
/*! @azure/msal-common v15.0.
|
|
6237
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6247
6238
|
|
|
6248
6239
|
/*
|
|
6249
6240
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6273,7 +6264,7 @@
|
|
|
6273
6264
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6274
6265
|
}
|
|
6275
6266
|
|
|
6276
|
-
/*! @azure/msal-common v15.0.
|
|
6267
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6277
6268
|
|
|
6278
6269
|
/*
|
|
6279
6270
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6423,7 +6414,7 @@
|
|
|
6423
6414
|
}
|
|
6424
6415
|
}
|
|
6425
6416
|
|
|
6426
|
-
/*! @azure/msal-common v15.0.
|
|
6417
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6427
6418
|
/*
|
|
6428
6419
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6429
6420
|
* Licensed under the MIT License.
|
|
@@ -6449,7 +6440,7 @@
|
|
|
6449
6440
|
refreshTokenExpired: refreshTokenExpired
|
|
6450
6441
|
});
|
|
6451
6442
|
|
|
6452
|
-
/*! @azure/msal-common v15.0.
|
|
6443
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6453
6444
|
|
|
6454
6445
|
/*
|
|
6455
6446
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6537,7 +6528,7 @@
|
|
|
6537
6528
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6538
6529
|
}
|
|
6539
6530
|
|
|
6540
|
-
/*! @azure/msal-common v15.0.
|
|
6531
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6541
6532
|
|
|
6542
6533
|
/*
|
|
6543
6534
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6609,7 +6600,7 @@
|
|
|
6609
6600
|
}
|
|
6610
6601
|
}
|
|
6611
6602
|
|
|
6612
|
-
/*! @azure/msal-common v15.0.
|
|
6603
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6613
6604
|
|
|
6614
6605
|
/*
|
|
6615
6606
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6693,7 +6684,7 @@
|
|
|
6693
6684
|
}
|
|
6694
6685
|
}
|
|
6695
6686
|
|
|
6696
|
-
/*! @azure/msal-common v15.0.
|
|
6687
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6697
6688
|
/*
|
|
6698
6689
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6699
6690
|
* Licensed under the MIT License.
|
|
@@ -6720,7 +6711,7 @@
|
|
|
6720
6711
|
}
|
|
6721
6712
|
}
|
|
6722
6713
|
|
|
6723
|
-
/*! @azure/msal-common v15.0.
|
|
6714
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
6724
6715
|
|
|
6725
6716
|
/*
|
|
6726
6717
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7097,7 +7088,7 @@
|
|
|
7097
7088
|
return baseAccount;
|
|
7098
7089
|
}
|
|
7099
7090
|
|
|
7100
|
-
/*! @azure/msal-common v15.0.
|
|
7091
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7101
7092
|
/*
|
|
7102
7093
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7103
7094
|
* Licensed under the MIT License.
|
|
@@ -7115,7 +7106,7 @@
|
|
|
7115
7106
|
}
|
|
7116
7107
|
}
|
|
7117
7108
|
|
|
7118
|
-
/*! @azure/msal-common v15.0.
|
|
7109
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7119
7110
|
|
|
7120
7111
|
/*
|
|
7121
7112
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7557,7 +7548,7 @@
|
|
|
7557
7548
|
}
|
|
7558
7549
|
}
|
|
7559
7550
|
|
|
7560
|
-
/*! @azure/msal-common v15.0.
|
|
7551
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7561
7552
|
|
|
7562
7553
|
/*
|
|
7563
7554
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7777,7 +7768,7 @@
|
|
|
7777
7768
|
}
|
|
7778
7769
|
}
|
|
7779
7770
|
|
|
7780
|
-
/*! @azure/msal-common v15.0.
|
|
7771
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7781
7772
|
|
|
7782
7773
|
/*
|
|
7783
7774
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7913,7 +7904,7 @@
|
|
|
7913
7904
|
}
|
|
7914
7905
|
}
|
|
7915
7906
|
|
|
7916
|
-
/*! @azure/msal-common v15.0.
|
|
7907
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7917
7908
|
|
|
7918
7909
|
/*
|
|
7919
7910
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7928,7 +7919,7 @@
|
|
|
7928
7919
|
},
|
|
7929
7920
|
};
|
|
7930
7921
|
|
|
7931
|
-
/*! @azure/msal-common v15.0.
|
|
7922
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7932
7923
|
|
|
7933
7924
|
/*
|
|
7934
7925
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7986,7 +7977,7 @@
|
|
|
7986
7977
|
}
|
|
7987
7978
|
}
|
|
7988
7979
|
|
|
7989
|
-
/*! @azure/msal-common v15.0.
|
|
7980
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
7990
7981
|
|
|
7991
7982
|
/*
|
|
7992
7983
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8249,7 +8240,7 @@
|
|
|
8249
8240
|
}
|
|
8250
8241
|
}
|
|
8251
8242
|
|
|
8252
|
-
/*! @azure/msal-common v15.0.
|
|
8243
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
8253
8244
|
/*
|
|
8254
8245
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8255
8246
|
* Licensed under the MIT License.
|
|
@@ -8257,7 +8248,7 @@
|
|
|
8257
8248
|
const missingKidError = "missing_kid_error";
|
|
8258
8249
|
const missingAlgError = "missing_alg_error";
|
|
8259
8250
|
|
|
8260
|
-
/*! @azure/msal-common v15.0.
|
|
8251
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
8261
8252
|
|
|
8262
8253
|
/*
|
|
8263
8254
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8282,7 +8273,7 @@
|
|
|
8282
8273
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
8283
8274
|
}
|
|
8284
8275
|
|
|
8285
|
-
/*! @azure/msal-common v15.0.
|
|
8276
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
8286
8277
|
|
|
8287
8278
|
/*
|
|
8288
8279
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8322,7 +8313,7 @@
|
|
|
8322
8313
|
}
|
|
8323
8314
|
}
|
|
8324
8315
|
|
|
8325
|
-
/*! @azure/msal-common v15.0.
|
|
8316
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
8326
8317
|
|
|
8327
8318
|
/*
|
|
8328
8319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8401,7 +8392,7 @@
|
|
|
8401
8392
|
}
|
|
8402
8393
|
}
|
|
8403
8394
|
|
|
8404
|
-
/*! @azure/msal-common v15.0.
|
|
8395
|
+
/*! @azure/msal-common v15.0.2 2025-01-22 */
|
|
8405
8396
|
|
|
8406
8397
|
/*
|
|
8407
8398
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10438,7 +10429,7 @@
|
|
|
10438
10429
|
|
|
10439
10430
|
/* eslint-disable header/header */
|
|
10440
10431
|
const name = "@azure/msal-browser";
|
|
10441
|
-
const version = "4.0.
|
|
10432
|
+
const version = "4.0.2";
|
|
10442
10433
|
|
|
10443
10434
|
/*
|
|
10444
10435
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -11743,36 +11734,14 @@
|
|
|
11743
11734
|
this.cacheConfig = cacheConfig;
|
|
11744
11735
|
this.logger = logger;
|
|
11745
11736
|
this.internalStorage = new MemoryStorage();
|
|
11746
|
-
this.browserStorage =
|
|
11747
|
-
this.temporaryCacheStorage =
|
|
11737
|
+
this.browserStorage = getStorageImplementation(clientId, cacheConfig.cacheLocation, logger, performanceClient);
|
|
11738
|
+
this.temporaryCacheStorage = getStorageImplementation(clientId, cacheConfig.temporaryCacheLocation, logger, performanceClient);
|
|
11748
11739
|
this.cookieStorage = new CookieStorage();
|
|
11749
11740
|
this.performanceClient = performanceClient;
|
|
11750
11741
|
}
|
|
11751
11742
|
async initialize(correlationId) {
|
|
11752
11743
|
await this.browserStorage.initialize(correlationId);
|
|
11753
11744
|
}
|
|
11754
|
-
/**
|
|
11755
|
-
* Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured cacheLocation.
|
|
11756
|
-
* @param cacheLocation
|
|
11757
|
-
*/
|
|
11758
|
-
setupBrowserStorage(cacheLocation) {
|
|
11759
|
-
try {
|
|
11760
|
-
switch (cacheLocation) {
|
|
11761
|
-
case BrowserCacheLocation.LocalStorage:
|
|
11762
|
-
return new LocalStorage(this.clientId, this.logger, this.performanceClient);
|
|
11763
|
-
case BrowserCacheLocation.SessionStorage:
|
|
11764
|
-
return new SessionStorage();
|
|
11765
|
-
case BrowserCacheLocation.MemoryStorage:
|
|
11766
|
-
default:
|
|
11767
|
-
break;
|
|
11768
|
-
}
|
|
11769
|
-
}
|
|
11770
|
-
catch (e) {
|
|
11771
|
-
this.logger.error(e);
|
|
11772
|
-
}
|
|
11773
|
-
this.cacheConfig.cacheLocation = BrowserCacheLocation.MemoryStorage;
|
|
11774
|
-
return new MemoryStorage();
|
|
11775
|
-
}
|
|
11776
11745
|
/**
|
|
11777
11746
|
* Parses passed value as JSON object, JSON.parse() will throw an error.
|
|
11778
11747
|
* @param input
|
|
@@ -12665,6 +12634,27 @@
|
|
|
12665
12634
|
}
|
|
12666
12635
|
}
|
|
12667
12636
|
}
|
|
12637
|
+
/**
|
|
12638
|
+
* Returns a window storage class implementing the IWindowStorage interface that corresponds to the configured cacheLocation.
|
|
12639
|
+
* @param cacheLocation
|
|
12640
|
+
*/
|
|
12641
|
+
function getStorageImplementation(clientId, cacheLocation, logger, performanceClient) {
|
|
12642
|
+
try {
|
|
12643
|
+
switch (cacheLocation) {
|
|
12644
|
+
case BrowserCacheLocation.LocalStorage:
|
|
12645
|
+
return new LocalStorage(clientId, logger, performanceClient);
|
|
12646
|
+
case BrowserCacheLocation.SessionStorage:
|
|
12647
|
+
return new SessionStorage();
|
|
12648
|
+
case BrowserCacheLocation.MemoryStorage:
|
|
12649
|
+
default:
|
|
12650
|
+
break;
|
|
12651
|
+
}
|
|
12652
|
+
}
|
|
12653
|
+
catch (e) {
|
|
12654
|
+
logger.error(e);
|
|
12655
|
+
}
|
|
12656
|
+
return new MemoryStorage();
|
|
12657
|
+
}
|
|
12668
12658
|
const DEFAULT_BROWSER_CACHE_MANAGER = (clientId, logger, performanceClient) => {
|
|
12669
12659
|
const cacheOptions = {
|
|
12670
12660
|
cacheLocation: BrowserCacheLocation.MemoryStorage,
|
|
@@ -13480,7 +13470,6 @@
|
|
|
13480
13470
|
this.nativeMessageHandler = provider;
|
|
13481
13471
|
this.nativeStorageManager = nativeStorageImpl;
|
|
13482
13472
|
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);
|
|
13483
|
-
this.serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
13484
13473
|
const extensionName = this.nativeMessageHandler.getExtensionId() ===
|
|
13485
13474
|
NativeConstants.PREFERRED_EXTENSION_ID
|
|
13486
13475
|
? "chrome"
|
|
@@ -13515,6 +13504,7 @@
|
|
|
13515
13504
|
// start the perf measurement
|
|
13516
13505
|
const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
|
|
13517
13506
|
const reqTimestamp = nowSeconds();
|
|
13507
|
+
const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
13518
13508
|
try {
|
|
13519
13509
|
// initialize native request
|
|
13520
13510
|
const nativeRequest = await this.initializeNativeRequest(request);
|
|
@@ -13547,7 +13537,7 @@
|
|
|
13547
13537
|
isNativeBroker: true,
|
|
13548
13538
|
requestId: result.requestId,
|
|
13549
13539
|
});
|
|
13550
|
-
|
|
13540
|
+
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13551
13541
|
return result;
|
|
13552
13542
|
})
|
|
13553
13543
|
.catch((error) => {
|
|
@@ -13562,7 +13552,7 @@
|
|
|
13562
13552
|
}
|
|
13563
13553
|
catch (e) {
|
|
13564
13554
|
if (e instanceof NativeAuthError) {
|
|
13565
|
-
|
|
13555
|
+
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
13566
13556
|
}
|
|
13567
13557
|
throw e;
|
|
13568
13558
|
}
|
|
@@ -13639,7 +13629,8 @@
|
|
|
13639
13629
|
catch (e) {
|
|
13640
13630
|
// Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
|
|
13641
13631
|
if (e instanceof NativeAuthError) {
|
|
13642
|
-
this.
|
|
13632
|
+
const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
13633
|
+
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
13643
13634
|
if (isFatalNativeAuthError(e)) {
|
|
13644
13635
|
throw e;
|
|
13645
13636
|
}
|
|
@@ -13694,7 +13685,8 @@
|
|
|
13694
13685
|
const result = this.handleNativeResponse(response, request, reqTimestamp);
|
|
13695
13686
|
this.browserStorage.setInteractionInProgress(false);
|
|
13696
13687
|
const res = await result;
|
|
13697
|
-
this.
|
|
13688
|
+
const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
13689
|
+
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13698
13690
|
return res;
|
|
13699
13691
|
}
|
|
13700
13692
|
catch (e) {
|
|
@@ -17633,10 +17625,7 @@
|
|
|
17633
17625
|
this.nestedAppAuthAdapter = new NestedAppAuthAdapter(this.config.auth.clientId, this.config.auth.clientCapabilities, this.browserCrypto, this.logger);
|
|
17634
17626
|
// Set the active account if available
|
|
17635
17627
|
const accountContext = this.bridgeProxy.getAccountContext();
|
|
17636
|
-
|
|
17637
|
-
const cachedAccount = getAccount(accountContext, this.logger, this.browserStorage);
|
|
17638
|
-
setActiveAccount(cachedAccount, this.browserStorage);
|
|
17639
|
-
}
|
|
17628
|
+
this.currentAccountContext = accountContext ? accountContext : null;
|
|
17640
17629
|
}
|
|
17641
17630
|
/**
|
|
17642
17631
|
* Factory function to create a new instance of NestedAppAuthController
|
|
@@ -17689,7 +17678,12 @@
|
|
|
17689
17678
|
};
|
|
17690
17679
|
// cache the tokens in the response
|
|
17691
17680
|
await this.hydrateCache(result, request);
|
|
17692
|
-
|
|
17681
|
+
// cache the account context in memory after successful token fetch
|
|
17682
|
+
this.currentAccountContext = {
|
|
17683
|
+
homeAccountId: result.account.homeAccountId,
|
|
17684
|
+
environment: result.account.environment,
|
|
17685
|
+
tenantId: result.account.tenantId,
|
|
17686
|
+
};
|
|
17693
17687
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Popup, result);
|
|
17694
17688
|
atPopupMeasurement.add({
|
|
17695
17689
|
accessTokenSize: result.accessToken.length,
|
|
@@ -17739,7 +17733,12 @@
|
|
|
17739
17733
|
const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
|
|
17740
17734
|
// cache the tokens in the response
|
|
17741
17735
|
await this.hydrateCache(result, request);
|
|
17742
|
-
|
|
17736
|
+
// cache the account context in memory after successful token fetch
|
|
17737
|
+
this.currentAccountContext = {
|
|
17738
|
+
homeAccountId: result.account.homeAccountId,
|
|
17739
|
+
environment: result.account.environment,
|
|
17740
|
+
tenantId: result.account.tenantId,
|
|
17741
|
+
};
|
|
17743
17742
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
17744
17743
|
ssoSilentMeasurement?.add({
|
|
17745
17744
|
accessTokenSize: result.accessToken.length,
|
|
@@ -17775,8 +17774,16 @@
|
|
|
17775
17774
|
this.logger.verbose("Claims are present in the request, skipping cache lookup");
|
|
17776
17775
|
return null;
|
|
17777
17776
|
}
|
|
17777
|
+
// if the request has forceRefresh, we cannot look up in the cache
|
|
17778
|
+
if (request.forceRefresh) {
|
|
17779
|
+
this.logger.verbose("forceRefresh is set to true, skipping cache lookup");
|
|
17780
|
+
return null;
|
|
17781
|
+
}
|
|
17778
17782
|
// respect cache lookup policy
|
|
17779
17783
|
let result = null;
|
|
17784
|
+
if (!request.cacheLookupPolicy) {
|
|
17785
|
+
request.cacheLookupPolicy = CacheLookupPolicy.Default;
|
|
17786
|
+
}
|
|
17780
17787
|
switch (request.cacheLookupPolicy) {
|
|
17781
17788
|
case CacheLookupPolicy.Default:
|
|
17782
17789
|
case CacheLookupPolicy.AccessToken:
|
|
@@ -17810,12 +17817,11 @@
|
|
|
17810
17817
|
* @returns
|
|
17811
17818
|
*/
|
|
17812
17819
|
async acquireTokenFromCacheInternal(request) {
|
|
17813
|
-
|
|
17820
|
+
// always prioritize the account context from the bridge
|
|
17821
|
+
const accountContext = this.bridgeProxy.getAccountContext() || this.currentAccountContext;
|
|
17814
17822
|
let currentAccount = null;
|
|
17815
17823
|
if (accountContext) {
|
|
17816
|
-
|
|
17817
|
-
// always prioritize for hub account context, the reqirement of `request.account` will be removed soon
|
|
17818
|
-
currentAccount = hubAccount || request.account;
|
|
17824
|
+
currentAccount = getAccount(accountContext, this.logger, this.browserStorage);
|
|
17819
17825
|
}
|
|
17820
17826
|
// fall back to brokering if no cached account is found
|
|
17821
17827
|
if (!currentAccount) {
|
|
@@ -18459,7 +18465,9 @@
|
|
|
18459
18465
|
await nestedAppAuth.initialize();
|
|
18460
18466
|
if (nestedAppAuth.isAvailable()) {
|
|
18461
18467
|
const controller = new NestedAppAuthController(nestedAppAuth);
|
|
18462
|
-
|
|
18468
|
+
const nestablePCA = new PublicClientApplication(configuration, controller);
|
|
18469
|
+
await nestablePCA.initialize();
|
|
18470
|
+
return nestablePCA;
|
|
18463
18471
|
}
|
|
18464
18472
|
return createStandardPublicClientApplication(configuration);
|
|
18465
18473
|
}
|