@azure/msal-browser 3.24.0 → 3.26.0
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/README.md +1 -1
- package/dist/app/IPublicClientApplication.d.ts +2 -1
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.d.ts +3 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +4 -3
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientNext.d.ts +2 -1
- package/dist/app/PublicClientNext.d.ts.map +1 -1
- package/dist/app/PublicClientNext.mjs +3 -3
- package/dist/app/PublicClientNext.mjs.map +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.mjs +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.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/IController.d.ts +2 -4
- package/dist/controllers/IController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts +3 -6
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +5 -11
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts +7 -5
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +78 -14
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.d.ts +2 -4
- package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +10 -11
- package/dist/controllers/UnknownOperatingContextController.mjs.map +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.d.ts +6 -18
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +23 -87
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +20 -2
- package/dist/interaction_client/RedirectClient.mjs.map +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 +198 -183
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +198 -183
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +61 -61
- package/lib/types/app/IPublicClientApplication.d.ts +2 -1
- package/lib/types/app/IPublicClientApplication.d.ts.map +1 -1
- package/lib/types/app/PublicClientApplication.d.ts +3 -1
- package/lib/types/app/PublicClientApplication.d.ts.map +1 -1
- package/lib/types/app/PublicClientNext.d.ts +2 -1
- package/lib/types/app/PublicClientNext.d.ts.map +1 -1
- package/lib/types/controllers/IController.d.ts +2 -4
- package/lib/types/controllers/IController.d.ts.map +1 -1
- package/lib/types/controllers/NestedAppAuthController.d.ts +3 -6
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts +7 -5
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/controllers/UnknownOperatingContextController.d.ts +2 -4
- package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/lib/types/event/EventHandler.d.ts +6 -18
- package/lib/types/event/EventHandler.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +2 -4
- package/src/app/IPublicClientApplication.ts +5 -1
- package/src/app/PublicClientApplication.ts +7 -2
- package/src/app/PublicClientNext.ts +6 -2
- package/src/controllers/IController.ts +5 -5
- package/src/controllers/NestedAppAuthController.ts +7 -11
- package/src/controllers/StandardController.ts +105 -13
- package/src/controllers/UnknownOperatingContextController.ts +12 -14
- package/src/event/EventHandler.ts +42 -117
- package/src/index.ts +1 -0
- package/src/interaction_client/RedirectClient.ts +25 -1
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.26.0 2024-10-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
5
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -311,7 +311,7 @@ const JsonWebTokenTypes = {
|
|
|
311
311
|
// Token renewal offset default in seconds
|
|
312
312
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
313
313
|
|
|
314
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
314
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
315
315
|
/*
|
|
316
316
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
317
317
|
* Licensed under the MIT License.
|
|
@@ -328,7 +328,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
328
328
|
unexpectedError: unexpectedError
|
|
329
329
|
});
|
|
330
330
|
|
|
331
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
331
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
332
332
|
|
|
333
333
|
/*
|
|
334
334
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -377,7 +377,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
377
377
|
: AuthErrorMessages[code]);
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
380
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
381
381
|
/*
|
|
382
382
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
383
383
|
* Licensed under the MIT License.
|
|
@@ -475,7 +475,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
475
475
|
userTimeoutReached: userTimeoutReached
|
|
476
476
|
});
|
|
477
477
|
|
|
478
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
478
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
479
479
|
|
|
480
480
|
/*
|
|
481
481
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -727,7 +727,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
727
727
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
728
728
|
}
|
|
729
729
|
|
|
730
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
730
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
731
731
|
|
|
732
732
|
/*
|
|
733
733
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -766,7 +766,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
766
766
|
},
|
|
767
767
|
};
|
|
768
768
|
|
|
769
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
769
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
770
770
|
|
|
771
771
|
/*
|
|
772
772
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -957,12 +957,12 @@ class Logger {
|
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
|
|
960
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
960
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
961
961
|
/* eslint-disable header/header */
|
|
962
962
|
const name$1 = "@azure/msal-common";
|
|
963
963
|
const version$1 = "14.15.0";
|
|
964
964
|
|
|
965
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
965
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
966
966
|
/*
|
|
967
967
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
968
968
|
* Licensed under the MIT License.
|
|
@@ -982,7 +982,7 @@ const AzureCloudInstance = {
|
|
|
982
982
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
983
983
|
};
|
|
984
984
|
|
|
985
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
985
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
986
986
|
|
|
987
987
|
/*
|
|
988
988
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1043,7 +1043,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1046
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1047
1047
|
/*
|
|
1048
1048
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1049
1049
|
* Licensed under the MIT License.
|
|
@@ -1080,7 +1080,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1080
1080
|
return cachedAtSec > nowSeconds();
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1083
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1084
1084
|
|
|
1085
1085
|
/*
|
|
1086
1086
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1407,7 +1407,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
1407
1407
|
return metadata.expiresAt <= nowSeconds();
|
|
1408
1408
|
}
|
|
1409
1409
|
|
|
1410
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1410
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1411
1411
|
/*
|
|
1412
1412
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1413
1413
|
* Licensed under the MIT License.
|
|
@@ -1461,7 +1461,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1461
1461
|
urlParseError: urlParseError
|
|
1462
1462
|
});
|
|
1463
1463
|
|
|
1464
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1464
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1465
1465
|
|
|
1466
1466
|
/*
|
|
1467
1467
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1599,7 +1599,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
1599
1599
|
return new ClientConfigurationError(errorCode);
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1602
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1603
1603
|
/*
|
|
1604
1604
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1605
1605
|
* Licensed under the MIT License.
|
|
@@ -1696,7 +1696,7 @@ class StringUtils {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1699
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1700
1700
|
|
|
1701
1701
|
/*
|
|
1702
1702
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1896,7 +1896,7 @@ class ScopeSet {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
|
|
1899
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1899
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1900
1900
|
|
|
1901
1901
|
/*
|
|
1902
1902
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1936,7 +1936,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
1936
1936
|
};
|
|
1937
1937
|
}
|
|
1938
1938
|
|
|
1939
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
1939
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
1940
1940
|
/*
|
|
1941
1941
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1942
1942
|
* Licensed under the MIT License.
|
|
@@ -2015,7 +2015,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
2015
2015
|
return updatedAccountInfo;
|
|
2016
2016
|
}
|
|
2017
2017
|
|
|
2018
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2018
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2019
2019
|
/*
|
|
2020
2020
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2021
2021
|
* Licensed under the MIT License.
|
|
@@ -2030,7 +2030,7 @@ const AuthorityType = {
|
|
|
2030
2030
|
Ciam: 3,
|
|
2031
2031
|
};
|
|
2032
2032
|
|
|
2033
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2033
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2034
2034
|
/*
|
|
2035
2035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2036
2036
|
* Licensed under the MIT License.
|
|
@@ -2052,7 +2052,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
2052
2052
|
return null;
|
|
2053
2053
|
}
|
|
2054
2054
|
|
|
2055
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2055
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2056
2056
|
/*
|
|
2057
2057
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2058
2058
|
* Licensed under the MIT License.
|
|
@@ -2065,7 +2065,7 @@ const ProtocolMode = {
|
|
|
2065
2065
|
OIDC: "OIDC",
|
|
2066
2066
|
};
|
|
2067
2067
|
|
|
2068
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2068
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2069
2069
|
|
|
2070
2070
|
/*
|
|
2071
2071
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2308,7 +2308,7 @@ class AccountEntity {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
}
|
|
2310
2310
|
|
|
2311
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2311
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2312
2312
|
|
|
2313
2313
|
/*
|
|
2314
2314
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2355,7 +2355,7 @@ function getDeserializedResponse(responseString) {
|
|
|
2355
2355
|
return null;
|
|
2356
2356
|
}
|
|
2357
2357
|
|
|
2358
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2358
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2359
2359
|
|
|
2360
2360
|
/*
|
|
2361
2361
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2519,7 +2519,7 @@ class UrlString {
|
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
2521
|
|
|
2522
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2522
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2523
2523
|
|
|
2524
2524
|
/*
|
|
2525
2525
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2659,7 +2659,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2659
2659
|
return null;
|
|
2660
2660
|
}
|
|
2661
2661
|
|
|
2662
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2662
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2663
2663
|
/*
|
|
2664
2664
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2665
2665
|
* Licensed under the MIT License.
|
|
@@ -2667,7 +2667,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2667
2667
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
2668
2668
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
2669
2669
|
|
|
2670
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2670
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2671
2671
|
|
|
2672
2672
|
/*
|
|
2673
2673
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2694,7 +2694,7 @@ class CacheError extends Error {
|
|
|
2694
2694
|
}
|
|
2695
2695
|
}
|
|
2696
2696
|
|
|
2697
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
2697
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
2698
2698
|
|
|
2699
2699
|
/*
|
|
2700
2700
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3946,7 +3946,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
3946
3946
|
}
|
|
3947
3947
|
}
|
|
3948
3948
|
|
|
3949
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
3949
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
3950
3950
|
|
|
3951
3951
|
/*
|
|
3952
3952
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4045,7 +4045,7 @@ function isOidcProtocolMode(config) {
|
|
|
4045
4045
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
4046
4046
|
}
|
|
4047
4047
|
|
|
4048
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4048
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4049
4049
|
|
|
4050
4050
|
/*
|
|
4051
4051
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4064,7 +4064,7 @@ class ServerError extends AuthError {
|
|
|
4064
4064
|
}
|
|
4065
4065
|
}
|
|
4066
4066
|
|
|
4067
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4067
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4068
4068
|
|
|
4069
4069
|
/*
|
|
4070
4070
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4162,7 +4162,7 @@ class ThrottlingUtils {
|
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
4164
4164
|
|
|
4165
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4165
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4166
4166
|
|
|
4167
4167
|
/*
|
|
4168
4168
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4199,7 +4199,7 @@ class NetworkManager {
|
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
|
|
4202
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4202
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4203
4203
|
/*
|
|
4204
4204
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4205
4205
|
* Licensed under the MIT License.
|
|
@@ -4209,7 +4209,7 @@ const CcsCredentialType = {
|
|
|
4209
4209
|
UPN: "UPN",
|
|
4210
4210
|
};
|
|
4211
4211
|
|
|
4212
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4212
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4213
4213
|
/*
|
|
4214
4214
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4215
4215
|
* Licensed under the MIT License.
|
|
@@ -4257,7 +4257,7 @@ const LOGIN_HINT = "login_hint";
|
|
|
4257
4257
|
const DOMAIN_HINT = "domain_hint";
|
|
4258
4258
|
const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
|
|
4259
4259
|
|
|
4260
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4260
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4261
4261
|
|
|
4262
4262
|
/*
|
|
4263
4263
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4324,7 +4324,7 @@ class RequestValidator {
|
|
|
4324
4324
|
}
|
|
4325
4325
|
}
|
|
4326
4326
|
|
|
4327
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4327
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4328
4328
|
|
|
4329
4329
|
/*
|
|
4330
4330
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4709,7 +4709,7 @@ class RequestParameterBuilder {
|
|
|
4709
4709
|
}
|
|
4710
4710
|
}
|
|
4711
4711
|
|
|
4712
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4712
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4713
4713
|
/*
|
|
4714
4714
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4715
4715
|
* Licensed under the MIT License.
|
|
@@ -4721,7 +4721,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
4721
4721
|
response.hasOwnProperty("jwks_uri"));
|
|
4722
4722
|
}
|
|
4723
4723
|
|
|
4724
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4724
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4725
4725
|
/*
|
|
4726
4726
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4727
4727
|
* Licensed under the MIT License.
|
|
@@ -4731,7 +4731,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
4731
4731
|
response.hasOwnProperty("metadata"));
|
|
4732
4732
|
}
|
|
4733
4733
|
|
|
4734
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4734
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4735
4735
|
/*
|
|
4736
4736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4737
4737
|
* Licensed under the MIT License.
|
|
@@ -4741,7 +4741,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
4741
4741
|
response.hasOwnProperty("error_description"));
|
|
4742
4742
|
}
|
|
4743
4743
|
|
|
4744
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
4744
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
4745
4745
|
/*
|
|
4746
4746
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4747
4747
|
* Licensed under the MIT License.
|
|
@@ -5223,7 +5223,7 @@ const IntFields = new Set([
|
|
|
5223
5223
|
"multiMatchedRT",
|
|
5224
5224
|
]);
|
|
5225
5225
|
|
|
5226
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
5226
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
5227
5227
|
/*
|
|
5228
5228
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5229
5229
|
* Licensed under the MIT License.
|
|
@@ -5319,7 +5319,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
5319
5319
|
};
|
|
5320
5320
|
};
|
|
5321
5321
|
|
|
5322
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
5322
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
5323
5323
|
|
|
5324
5324
|
/*
|
|
5325
5325
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5428,7 +5428,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
5428
5428
|
},
|
|
5429
5429
|
};
|
|
5430
5430
|
|
|
5431
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
5431
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
5432
5432
|
|
|
5433
5433
|
/*
|
|
5434
5434
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6267,7 +6267,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
6267
6267
|
};
|
|
6268
6268
|
}
|
|
6269
6269
|
|
|
6270
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6270
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6271
6271
|
|
|
6272
6272
|
/*
|
|
6273
6273
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6298,7 +6298,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
6298
6298
|
}
|
|
6299
6299
|
}
|
|
6300
6300
|
|
|
6301
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6301
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6302
6302
|
|
|
6303
6303
|
/*
|
|
6304
6304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6401,7 +6401,7 @@ class BaseClient {
|
|
|
6401
6401
|
}
|
|
6402
6402
|
}
|
|
6403
6403
|
|
|
6404
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6404
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6405
6405
|
/*
|
|
6406
6406
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6407
6407
|
* Licensed under the MIT License.
|
|
@@ -6427,7 +6427,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6427
6427
|
refreshTokenExpired: refreshTokenExpired
|
|
6428
6428
|
});
|
|
6429
6429
|
|
|
6430
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6430
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6431
6431
|
|
|
6432
6432
|
/*
|
|
6433
6433
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6515,7 +6515,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
6515
6515
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6516
6516
|
}
|
|
6517
6517
|
|
|
6518
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6518
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6519
6519
|
|
|
6520
6520
|
/*
|
|
6521
6521
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6587,7 +6587,7 @@ class ProtocolUtils {
|
|
|
6587
6587
|
}
|
|
6588
6588
|
}
|
|
6589
6589
|
|
|
6590
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6590
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6591
6591
|
|
|
6592
6592
|
/*
|
|
6593
6593
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6671,7 +6671,7 @@ class PopTokenGenerator {
|
|
|
6671
6671
|
}
|
|
6672
6672
|
}
|
|
6673
6673
|
|
|
6674
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6674
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6675
6675
|
/*
|
|
6676
6676
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6677
6677
|
* Licensed under the MIT License.
|
|
@@ -6698,7 +6698,7 @@ class PopTokenGenerator {
|
|
|
6698
6698
|
}
|
|
6699
6699
|
}
|
|
6700
6700
|
|
|
6701
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
6701
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
6702
6702
|
|
|
6703
6703
|
/*
|
|
6704
6704
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7075,7 +7075,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
7075
7075
|
return baseAccount;
|
|
7076
7076
|
}
|
|
7077
7077
|
|
|
7078
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7078
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7079
7079
|
/*
|
|
7080
7080
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7081
7081
|
* Licensed under the MIT License.
|
|
@@ -7093,7 +7093,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
7093
7093
|
}
|
|
7094
7094
|
}
|
|
7095
7095
|
|
|
7096
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7096
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7097
7097
|
|
|
7098
7098
|
/*
|
|
7099
7099
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7524,7 +7524,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7524
7524
|
}
|
|
7525
7525
|
}
|
|
7526
7526
|
|
|
7527
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7527
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7528
7528
|
|
|
7529
7529
|
/*
|
|
7530
7530
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7738,7 +7738,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7738
7738
|
}
|
|
7739
7739
|
}
|
|
7740
7740
|
|
|
7741
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7741
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7742
7742
|
|
|
7743
7743
|
/*
|
|
7744
7744
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7874,7 +7874,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
7874
7874
|
}
|
|
7875
7875
|
}
|
|
7876
7876
|
|
|
7877
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7877
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7878
7878
|
|
|
7879
7879
|
/*
|
|
7880
7880
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7889,7 +7889,7 @@ const StubbedNetworkModule = {
|
|
|
7889
7889
|
},
|
|
7890
7890
|
};
|
|
7891
7891
|
|
|
7892
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7892
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7893
7893
|
|
|
7894
7894
|
/*
|
|
7895
7895
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7947,7 +7947,7 @@ class AuthenticationHeaderParser {
|
|
|
7947
7947
|
}
|
|
7948
7948
|
}
|
|
7949
7949
|
|
|
7950
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
7950
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
7951
7951
|
|
|
7952
7952
|
/*
|
|
7953
7953
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8210,7 +8210,7 @@ class ServerTelemetryManager {
|
|
|
8210
8210
|
}
|
|
8211
8211
|
}
|
|
8212
8212
|
|
|
8213
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
8213
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
8214
8214
|
/*
|
|
8215
8215
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8216
8216
|
* Licensed under the MIT License.
|
|
@@ -8218,7 +8218,7 @@ class ServerTelemetryManager {
|
|
|
8218
8218
|
const missingKidError = "missing_kid_error";
|
|
8219
8219
|
const missingAlgError = "missing_alg_error";
|
|
8220
8220
|
|
|
8221
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
8221
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
8222
8222
|
|
|
8223
8223
|
/*
|
|
8224
8224
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8243,7 +8243,7 @@ function createJoseHeaderError(code) {
|
|
|
8243
8243
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
8244
8244
|
}
|
|
8245
8245
|
|
|
8246
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
8246
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
8247
8247
|
|
|
8248
8248
|
/*
|
|
8249
8249
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8283,7 +8283,7 @@ class JoseHeader {
|
|
|
8283
8283
|
}
|
|
8284
8284
|
}
|
|
8285
8285
|
|
|
8286
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
8286
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
8287
8287
|
|
|
8288
8288
|
/*
|
|
8289
8289
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8362,7 +8362,7 @@ class StubPerformanceClient {
|
|
|
8362
8362
|
}
|
|
8363
8363
|
}
|
|
8364
8364
|
|
|
8365
|
-
/*! @azure/msal-common v14.15.0 2024-
|
|
8365
|
+
/*! @azure/msal-common v14.15.0 2024-10-08 */
|
|
8366
8366
|
|
|
8367
8367
|
/*
|
|
8368
8368
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10234,7 +10234,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
10234
10234
|
|
|
10235
10235
|
/* eslint-disable header/header */
|
|
10236
10236
|
const name = "@azure/msal-browser";
|
|
10237
|
-
const version = "3.
|
|
10237
|
+
const version = "3.26.0";
|
|
10238
10238
|
|
|
10239
10239
|
/*
|
|
10240
10240
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -12705,24 +12705,26 @@ const EventType = {
|
|
|
12705
12705
|
* Licensed under the MIT License.
|
|
12706
12706
|
*/
|
|
12707
12707
|
class EventHandler {
|
|
12708
|
-
constructor(logger
|
|
12708
|
+
constructor(logger) {
|
|
12709
12709
|
this.eventCallbacks = new Map();
|
|
12710
|
-
this.logger = logger;
|
|
12711
|
-
this.browserCrypto = browserCrypto;
|
|
12712
|
-
this.listeningToStorageEvents = false;
|
|
12713
|
-
this.handleAccountCacheChange =
|
|
12714
|
-
this.handleAccountCacheChange.bind(this);
|
|
12710
|
+
this.logger = logger || new Logger({});
|
|
12715
12711
|
}
|
|
12716
12712
|
/**
|
|
12717
12713
|
* Adds event callbacks to array
|
|
12718
|
-
* @param callback
|
|
12714
|
+
* @param callback - callback to be invoked when an event is raised
|
|
12715
|
+
* @param eventTypes - list of events that this callback will be invoked for, if not provided callback will be invoked for all events
|
|
12716
|
+
* @param callbackId - Identifier for the callback, used to locate and remove the callback when no longer required
|
|
12719
12717
|
*/
|
|
12720
|
-
addEventCallback(callback) {
|
|
12718
|
+
addEventCallback(callback, eventTypes, callbackId) {
|
|
12721
12719
|
if (typeof window !== "undefined") {
|
|
12722
|
-
const
|
|
12723
|
-
this.eventCallbacks.
|
|
12724
|
-
|
|
12725
|
-
|
|
12720
|
+
const id = callbackId || createGuid();
|
|
12721
|
+
if (this.eventCallbacks.has(id)) {
|
|
12722
|
+
this.logger.error(`Event callback with id: ${id} is already registered. Please provide a unique id or remove the existing callback and try again.`);
|
|
12723
|
+
return null;
|
|
12724
|
+
}
|
|
12725
|
+
this.eventCallbacks.set(id, [callback, eventTypes || []]);
|
|
12726
|
+
this.logger.verbose(`Event callback registered with id: ${id}`);
|
|
12727
|
+
return id;
|
|
12726
12728
|
}
|
|
12727
12729
|
return null;
|
|
12728
12730
|
}
|
|
@@ -12734,38 +12736,6 @@ class EventHandler {
|
|
|
12734
12736
|
this.eventCallbacks.delete(callbackId);
|
|
12735
12737
|
this.logger.verbose(`Event callback ${callbackId} removed.`);
|
|
12736
12738
|
}
|
|
12737
|
-
/**
|
|
12738
|
-
* Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
|
|
12739
|
-
*/
|
|
12740
|
-
enableAccountStorageEvents() {
|
|
12741
|
-
if (typeof window === "undefined") {
|
|
12742
|
-
return;
|
|
12743
|
-
}
|
|
12744
|
-
if (!this.listeningToStorageEvents) {
|
|
12745
|
-
this.logger.verbose("Adding account storage listener.");
|
|
12746
|
-
this.listeningToStorageEvents = true;
|
|
12747
|
-
window.addEventListener("storage", this.handleAccountCacheChange);
|
|
12748
|
-
}
|
|
12749
|
-
else {
|
|
12750
|
-
this.logger.verbose("Account storage listener already registered.");
|
|
12751
|
-
}
|
|
12752
|
-
}
|
|
12753
|
-
/**
|
|
12754
|
-
* Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
|
|
12755
|
-
*/
|
|
12756
|
-
disableAccountStorageEvents() {
|
|
12757
|
-
if (typeof window === "undefined") {
|
|
12758
|
-
return;
|
|
12759
|
-
}
|
|
12760
|
-
if (this.listeningToStorageEvents) {
|
|
12761
|
-
this.logger.verbose("Removing account storage listener.");
|
|
12762
|
-
window.removeEventListener("storage", this.handleAccountCacheChange);
|
|
12763
|
-
this.listeningToStorageEvents = false;
|
|
12764
|
-
}
|
|
12765
|
-
else {
|
|
12766
|
-
this.logger.verbose("No account storage listener registered.");
|
|
12767
|
-
}
|
|
12768
|
-
}
|
|
12769
12739
|
/**
|
|
12770
12740
|
* Emits events by calling callback with event message
|
|
12771
12741
|
* @param eventType
|
|
@@ -12782,48 +12752,15 @@ class EventHandler {
|
|
|
12782
12752
|
error: error || null,
|
|
12783
12753
|
timestamp: Date.now(),
|
|
12784
12754
|
};
|
|
12785
|
-
this.
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12755
|
+
this.eventCallbacks.forEach(([callback, eventTypes], callbackId) => {
|
|
12756
|
+
if (eventTypes.length === 0 ||
|
|
12757
|
+
eventTypes.includes(eventType)) {
|
|
12758
|
+
this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);
|
|
12759
|
+
callback.apply(null, [message]);
|
|
12760
|
+
}
|
|
12789
12761
|
});
|
|
12790
12762
|
}
|
|
12791
12763
|
}
|
|
12792
|
-
/**
|
|
12793
|
-
* Emit account added/removed events when cached accounts are changed in a different tab or frame
|
|
12794
|
-
*/
|
|
12795
|
-
handleAccountCacheChange(e) {
|
|
12796
|
-
try {
|
|
12797
|
-
// Handle active account filter change
|
|
12798
|
-
if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
|
|
12799
|
-
// This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
|
|
12800
|
-
this.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
|
|
12801
|
-
}
|
|
12802
|
-
// Handle account object change
|
|
12803
|
-
const cacheValue = e.newValue || e.oldValue;
|
|
12804
|
-
if (!cacheValue) {
|
|
12805
|
-
return;
|
|
12806
|
-
}
|
|
12807
|
-
const parsedValue = JSON.parse(cacheValue);
|
|
12808
|
-
if (typeof parsedValue !== "object" ||
|
|
12809
|
-
!AccountEntity.isAccountEntity(parsedValue)) {
|
|
12810
|
-
return;
|
|
12811
|
-
}
|
|
12812
|
-
const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
|
|
12813
|
-
const accountInfo = accountEntity.getAccountInfo();
|
|
12814
|
-
if (!e.oldValue && e.newValue) {
|
|
12815
|
-
this.logger.info("Account was added to cache in a different window");
|
|
12816
|
-
this.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
|
|
12817
|
-
}
|
|
12818
|
-
else if (!e.newValue && e.oldValue) {
|
|
12819
|
-
this.logger.info("Account was removed from cache in a different window");
|
|
12820
|
-
this.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
|
|
12821
|
-
}
|
|
12822
|
-
}
|
|
12823
|
-
catch (e) {
|
|
12824
|
-
return;
|
|
12825
|
-
}
|
|
12826
|
-
}
|
|
12827
12764
|
}
|
|
12828
12765
|
|
|
12829
12766
|
/*
|
|
@@ -14988,6 +14925,18 @@ class RedirectHandler {
|
|
|
14988
14925
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14989
14926
|
* Licensed under the MIT License.
|
|
14990
14927
|
*/
|
|
14928
|
+
function getNavigationType() {
|
|
14929
|
+
if (typeof window === "undefined" ||
|
|
14930
|
+
typeof window.performance === "undefined" ||
|
|
14931
|
+
typeof window.performance.getEntriesByType !== "function") {
|
|
14932
|
+
return undefined;
|
|
14933
|
+
}
|
|
14934
|
+
const navigationEntries = window.performance.getEntriesByType("navigation");
|
|
14935
|
+
const navigation = navigationEntries.length
|
|
14936
|
+
? navigationEntries[0]
|
|
14937
|
+
: undefined;
|
|
14938
|
+
return navigation?.type;
|
|
14939
|
+
}
|
|
14991
14940
|
class RedirectClient extends StandardInteractionClient {
|
|
14992
14941
|
constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, nativeStorageImpl, nativeMessageHandler, correlationId) {
|
|
14993
14942
|
super(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, nativeMessageHandler, correlationId);
|
|
@@ -15069,7 +15018,13 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
15069
15018
|
// Not a recognized server response hash or hash not associated with a redirect request
|
|
15070
15019
|
this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache.");
|
|
15071
15020
|
this.browserStorage.cleanRequestByInteractionType(exports.InteractionType.Redirect);
|
|
15072
|
-
|
|
15021
|
+
// Do not instrument "no_server_response" if user clicked back button
|
|
15022
|
+
if (getNavigationType() !== "back_forward") {
|
|
15023
|
+
parentMeasurement.event.errorCode = "no_server_response";
|
|
15024
|
+
}
|
|
15025
|
+
else {
|
|
15026
|
+
this.logger.verbose("Back navigation event detected. Muting no_server_response error");
|
|
15027
|
+
}
|
|
15073
15028
|
return null;
|
|
15074
15029
|
}
|
|
15075
15030
|
// If navigateToLoginRequestUrl is true, get the url where the redirect request was initiated
|
|
@@ -15967,7 +15922,7 @@ class StandardController {
|
|
|
15967
15922
|
this.browserCrypto = this.isBrowserEnvironment
|
|
15968
15923
|
? new CryptoOps(this.logger, this.performanceClient)
|
|
15969
15924
|
: DEFAULT_CRYPTO_IMPLEMENTATION;
|
|
15970
|
-
this.eventHandler = new EventHandler(this.logger
|
|
15925
|
+
this.eventHandler = new EventHandler(this.logger);
|
|
15971
15926
|
// Initialize the browser storage class.
|
|
15972
15927
|
this.browserStorage = this.isBrowserEnvironment
|
|
15973
15928
|
? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth), this.performanceClient)
|
|
@@ -15990,6 +15945,10 @@ class StandardController {
|
|
|
15990
15945
|
// Register listener functions
|
|
15991
15946
|
this.trackPageVisibilityWithMeasurement =
|
|
15992
15947
|
this.trackPageVisibilityWithMeasurement.bind(this);
|
|
15948
|
+
// account storage events
|
|
15949
|
+
this.listeningToStorageEvents = false;
|
|
15950
|
+
this.handleAccountCacheChange =
|
|
15951
|
+
this.handleAccountCacheChange.bind(this);
|
|
15993
15952
|
}
|
|
15994
15953
|
static async createController(operatingContext, request) {
|
|
15995
15954
|
const controller = new StandardController(operatingContext);
|
|
@@ -16013,6 +15972,12 @@ class StandardController {
|
|
|
16013
15972
|
this.logger.info("initialize has already been called, exiting early.");
|
|
16014
15973
|
return;
|
|
16015
15974
|
}
|
|
15975
|
+
if (!this.isBrowserEnvironment) {
|
|
15976
|
+
this.logger.info("in non-browser environment, exiting early.");
|
|
15977
|
+
this.initialized = true;
|
|
15978
|
+
this.eventHandler.emitEvent(EventType.INITIALIZE_END);
|
|
15979
|
+
return;
|
|
15980
|
+
}
|
|
16016
15981
|
const initCorrelationId = request?.correlationId || this.getRequestCorrelationId();
|
|
16017
15982
|
const allowNativeBroker = this.config.system.allowNativeBroker;
|
|
16018
15983
|
const initMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.InitializeClientApplication, initCorrelationId);
|
|
@@ -16662,6 +16627,10 @@ class StandardController {
|
|
|
16662
16627
|
* @param logoutRequest
|
|
16663
16628
|
*/
|
|
16664
16629
|
async clearCache(logoutRequest) {
|
|
16630
|
+
if (!this.isBrowserEnvironment) {
|
|
16631
|
+
this.logger.info("in non-browser environment, returning early.");
|
|
16632
|
+
return;
|
|
16633
|
+
}
|
|
16665
16634
|
const correlationId = this.getRequestCorrelationId(logoutRequest);
|
|
16666
16635
|
const cacheClient = this.createSilentCacheClient(correlationId);
|
|
16667
16636
|
return cacheClient.logout(logoutRequest);
|
|
@@ -16847,8 +16816,8 @@ class StandardController {
|
|
|
16847
16816
|
* Adds event callbacks to array
|
|
16848
16817
|
* @param callback
|
|
16849
16818
|
*/
|
|
16850
|
-
addEventCallback(callback) {
|
|
16851
|
-
return this.eventHandler.addEventCallback(callback);
|
|
16819
|
+
addEventCallback(callback, eventTypes) {
|
|
16820
|
+
return this.eventHandler.addEventCallback(callback, eventTypes);
|
|
16852
16821
|
}
|
|
16853
16822
|
/**
|
|
16854
16823
|
* Removes callback with provided id from callback array
|
|
@@ -16864,6 +16833,7 @@ class StandardController {
|
|
|
16864
16833
|
* @returns {string}
|
|
16865
16834
|
*/
|
|
16866
16835
|
addPerformanceCallback(callback) {
|
|
16836
|
+
blockNonBrowserEnvironment();
|
|
16867
16837
|
return this.performanceClient.addPerformanceCallback(callback);
|
|
16868
16838
|
}
|
|
16869
16839
|
/**
|
|
@@ -16879,13 +16849,68 @@ class StandardController {
|
|
|
16879
16849
|
* Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
|
|
16880
16850
|
*/
|
|
16881
16851
|
enableAccountStorageEvents() {
|
|
16882
|
-
|
|
16852
|
+
if (typeof window === "undefined") {
|
|
16853
|
+
return;
|
|
16854
|
+
}
|
|
16855
|
+
if (!this.listeningToStorageEvents) {
|
|
16856
|
+
this.logger.verbose("Adding account storage listener.");
|
|
16857
|
+
this.listeningToStorageEvents = true;
|
|
16858
|
+
window.addEventListener("storage", this.handleAccountCacheChange);
|
|
16859
|
+
}
|
|
16860
|
+
else {
|
|
16861
|
+
this.logger.verbose("Account storage listener already registered.");
|
|
16862
|
+
}
|
|
16883
16863
|
}
|
|
16884
16864
|
/**
|
|
16885
16865
|
* Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
|
|
16886
16866
|
*/
|
|
16887
16867
|
disableAccountStorageEvents() {
|
|
16888
|
-
|
|
16868
|
+
if (typeof window === "undefined") {
|
|
16869
|
+
return;
|
|
16870
|
+
}
|
|
16871
|
+
if (this.listeningToStorageEvents) {
|
|
16872
|
+
this.logger.verbose("Removing account storage listener.");
|
|
16873
|
+
window.removeEventListener("storage", this.handleAccountCacheChange);
|
|
16874
|
+
this.listeningToStorageEvents = false;
|
|
16875
|
+
}
|
|
16876
|
+
else {
|
|
16877
|
+
this.logger.verbose("No account storage listener registered.");
|
|
16878
|
+
}
|
|
16879
|
+
}
|
|
16880
|
+
/**
|
|
16881
|
+
* Emit account added/removed events when cached accounts are changed in a different tab or frame
|
|
16882
|
+
*/
|
|
16883
|
+
handleAccountCacheChange(e) {
|
|
16884
|
+
try {
|
|
16885
|
+
// Handle active account filter change
|
|
16886
|
+
if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
|
|
16887
|
+
// This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
|
|
16888
|
+
this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
|
|
16889
|
+
}
|
|
16890
|
+
// Handle account object change
|
|
16891
|
+
const cacheValue = e.newValue || e.oldValue;
|
|
16892
|
+
if (!cacheValue) {
|
|
16893
|
+
return;
|
|
16894
|
+
}
|
|
16895
|
+
const parsedValue = JSON.parse(cacheValue);
|
|
16896
|
+
if (typeof parsedValue !== "object" ||
|
|
16897
|
+
!AccountEntity.isAccountEntity(parsedValue)) {
|
|
16898
|
+
return;
|
|
16899
|
+
}
|
|
16900
|
+
const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
|
|
16901
|
+
const accountInfo = accountEntity.getAccountInfo();
|
|
16902
|
+
if (!e.oldValue && e.newValue) {
|
|
16903
|
+
this.logger.info("Account was added to cache in a different window");
|
|
16904
|
+
this.eventHandler.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
|
|
16905
|
+
}
|
|
16906
|
+
else if (!e.newValue && e.oldValue) {
|
|
16907
|
+
this.logger.info("Account was removed from cache in a different window");
|
|
16908
|
+
this.eventHandler.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
|
|
16909
|
+
}
|
|
16910
|
+
}
|
|
16911
|
+
catch (e) {
|
|
16912
|
+
return;
|
|
16913
|
+
}
|
|
16889
16914
|
}
|
|
16890
16915
|
/**
|
|
16891
16916
|
* Gets the token cache for the application.
|
|
@@ -16940,12 +16965,6 @@ class StandardController {
|
|
|
16940
16965
|
isBrowserEnv() {
|
|
16941
16966
|
return this.isBrowserEnvironment;
|
|
16942
16967
|
}
|
|
16943
|
-
/**
|
|
16944
|
-
* Returns the event handler
|
|
16945
|
-
*/
|
|
16946
|
-
getEventHandler() {
|
|
16947
|
-
return this.eventHandler;
|
|
16948
|
-
}
|
|
16949
16968
|
/**
|
|
16950
16969
|
* Generates a correlation id for a request if none is provided.
|
|
16951
16970
|
*
|
|
@@ -17471,7 +17490,7 @@ class NestedAppAuthController {
|
|
|
17471
17490
|
this.browserStorage = this.operatingContext.isBrowserEnvironment()
|
|
17472
17491
|
? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth))
|
|
17473
17492
|
: DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
|
|
17474
|
-
this.eventHandler = new EventHandler(this.logger
|
|
17493
|
+
this.eventHandler = new EventHandler(this.logger);
|
|
17475
17494
|
this.nestedAppAuthAdapter = new NestedAppAuthAdapter(this.config.auth.clientId, this.config.auth.clientCapabilities, this.browserCrypto, this.logger);
|
|
17476
17495
|
// Set the active account if available
|
|
17477
17496
|
const accountContext = this.bridgeProxy.getAccountContext();
|
|
@@ -17480,13 +17499,6 @@ class NestedAppAuthController {
|
|
|
17480
17499
|
setActiveAccount(cachedAccount, this.browserStorage);
|
|
17481
17500
|
}
|
|
17482
17501
|
}
|
|
17483
|
-
/**
|
|
17484
|
-
* Returns the event handler instance
|
|
17485
|
-
* @returns EventHandler
|
|
17486
|
-
*/
|
|
17487
|
-
getEventHandler() {
|
|
17488
|
-
return this.eventHandler;
|
|
17489
|
-
}
|
|
17490
17502
|
/**
|
|
17491
17503
|
* Factory function to create a new instance of NestedAppAuthController
|
|
17492
17504
|
* @param operatingContext
|
|
@@ -17742,9 +17754,10 @@ class NestedAppAuthController {
|
|
|
17742
17754
|
/**
|
|
17743
17755
|
* Adds event callbacks to array
|
|
17744
17756
|
* @param callback
|
|
17757
|
+
* @param eventTypes
|
|
17745
17758
|
*/
|
|
17746
|
-
addEventCallback(callback) {
|
|
17747
|
-
return this.eventHandler.addEventCallback(callback);
|
|
17759
|
+
addEventCallback(callback, eventTypes) {
|
|
17760
|
+
return this.eventHandler.addEventCallback(callback, eventTypes);
|
|
17748
17761
|
}
|
|
17749
17762
|
/**
|
|
17750
17763
|
* Removes callback with provided id from callback array
|
|
@@ -18043,9 +18056,10 @@ class PublicClientApplication {
|
|
|
18043
18056
|
/**
|
|
18044
18057
|
* Adds event callbacks to array
|
|
18045
18058
|
* @param callback
|
|
18059
|
+
* @param eventTypes
|
|
18046
18060
|
*/
|
|
18047
|
-
addEventCallback(callback) {
|
|
18048
|
-
return this.controller.addEventCallback(callback);
|
|
18061
|
+
addEventCallback(callback, eventTypes) {
|
|
18062
|
+
return this.controller.addEventCallback(callback, eventTypes);
|
|
18049
18063
|
}
|
|
18050
18064
|
/**
|
|
18051
18065
|
* Removes callback with provided id from callback array
|
|
@@ -18345,14 +18359,10 @@ class UnknownOperatingContextController {
|
|
|
18345
18359
|
this.browserStorage = this.isBrowserEnvironment
|
|
18346
18360
|
? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, undefined, this.performanceClient)
|
|
18347
18361
|
: DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
|
|
18348
|
-
this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
|
|
18349
18362
|
}
|
|
18350
18363
|
getBrowserStorage() {
|
|
18351
18364
|
return this.browserStorage;
|
|
18352
18365
|
}
|
|
18353
|
-
getEventHandler() {
|
|
18354
|
-
return this.eventHandler;
|
|
18355
|
-
}
|
|
18356
18366
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18357
18367
|
getAccount(accountFilter) {
|
|
18358
18368
|
return null;
|
|
@@ -18422,12 +18432,16 @@ class UnknownOperatingContextController {
|
|
|
18422
18432
|
blockNonBrowserEnvironment();
|
|
18423
18433
|
return {};
|
|
18424
18434
|
}
|
|
18425
|
-
addEventCallback(
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18435
|
+
addEventCallback(
|
|
18436
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18437
|
+
callback,
|
|
18438
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18439
|
+
eventTypes) {
|
|
18440
|
+
return null;
|
|
18430
18441
|
}
|
|
18442
|
+
removeEventCallback(
|
|
18443
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18444
|
+
callbackId) { }
|
|
18431
18445
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18432
18446
|
addPerformanceCallback(callback) {
|
|
18433
18447
|
blockAPICallsBeforeInitialize(this.initialized);
|
|
@@ -18728,8 +18742,8 @@ class PublicClientNext {
|
|
|
18728
18742
|
* Adds event callbacks to array
|
|
18729
18743
|
* @param callback
|
|
18730
18744
|
*/
|
|
18731
|
-
addEventCallback(callback) {
|
|
18732
|
-
return this.controller.addEventCallback(callback);
|
|
18745
|
+
addEventCallback(callback, eventTypes) {
|
|
18746
|
+
return this.controller.addEventCallback(callback, eventTypes);
|
|
18733
18747
|
}
|
|
18734
18748
|
/**
|
|
18735
18749
|
* Removes callback with provided id from callback array
|
|
@@ -19466,6 +19480,7 @@ exports.ClientConfigurationError = ClientConfigurationError;
|
|
|
19466
19480
|
exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
|
|
19467
19481
|
exports.ClientConfigurationErrorMessage = ClientConfigurationErrorMessage;
|
|
19468
19482
|
exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
|
|
19483
|
+
exports.EventHandler = EventHandler;
|
|
19469
19484
|
exports.EventMessageUtils = EventMessageUtils;
|
|
19470
19485
|
exports.EventType = EventType;
|
|
19471
19486
|
exports.InteractionRequiredAuthError = InteractionRequiredAuthError;
|