@azure/msal-browser 3.25.0 → 3.26.1

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.
Files changed (127) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +2 -1
  2. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  3. package/dist/app/IPublicClientApplication.mjs +1 -1
  4. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  5. package/dist/app/PublicClientApplication.d.ts +3 -1
  6. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  7. package/dist/app/PublicClientApplication.mjs +4 -3
  8. package/dist/app/PublicClientApplication.mjs.map +1 -1
  9. package/dist/app/PublicClientNext.d.ts +2 -1
  10. package/dist/app/PublicClientNext.d.ts.map +1 -1
  11. package/dist/app/PublicClientNext.mjs +3 -3
  12. package/dist/app/PublicClientNext.mjs.map +1 -1
  13. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  14. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  15. package/dist/cache/AccountManager.mjs +1 -1
  16. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  17. package/dist/cache/BrowserCacheManager.mjs +1 -1
  18. package/dist/cache/BrowserStorage.mjs +1 -1
  19. package/dist/cache/DatabaseStorage.mjs +1 -1
  20. package/dist/cache/MemoryStorage.mjs +1 -1
  21. package/dist/cache/TokenCache.mjs +1 -1
  22. package/dist/config/Configuration.mjs +1 -1
  23. package/dist/controllers/ControllerFactory.mjs +1 -1
  24. package/dist/controllers/IController.d.ts +2 -4
  25. package/dist/controllers/IController.d.ts.map +1 -1
  26. package/dist/controllers/NestedAppAuthController.d.ts +3 -6
  27. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  28. package/dist/controllers/NestedAppAuthController.mjs +26 -18
  29. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  30. package/dist/controllers/StandardController.d.ts +7 -5
  31. package/dist/controllers/StandardController.d.ts.map +1 -1
  32. package/dist/controllers/StandardController.mjs +78 -14
  33. package/dist/controllers/StandardController.mjs.map +1 -1
  34. package/dist/controllers/UnknownOperatingContextController.d.ts +2 -4
  35. package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  36. package/dist/controllers/UnknownOperatingContextController.mjs +10 -11
  37. package/dist/controllers/UnknownOperatingContextController.mjs.map +1 -1
  38. package/dist/crypto/BrowserCrypto.mjs +1 -1
  39. package/dist/crypto/CryptoOps.mjs +1 -1
  40. package/dist/crypto/PkceGenerator.mjs +1 -1
  41. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  42. package/dist/encode/Base64Decode.mjs +1 -1
  43. package/dist/encode/Base64Encode.mjs +1 -1
  44. package/dist/error/BrowserAuthError.mjs +1 -1
  45. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  46. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  47. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  48. package/dist/error/NativeAuthError.mjs +1 -1
  49. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  50. package/dist/error/NestedAppAuthError.mjs +1 -1
  51. package/dist/event/EventHandler.d.ts +6 -18
  52. package/dist/event/EventHandler.d.ts.map +1 -1
  53. package/dist/event/EventHandler.mjs +23 -87
  54. package/dist/event/EventHandler.mjs.map +1 -1
  55. package/dist/event/EventMessage.mjs +1 -1
  56. package/dist/event/EventType.mjs +1 -1
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.mjs +2 -1
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  62. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  63. package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
  64. package/dist/interaction_client/PopupClient.mjs +1 -1
  65. package/dist/interaction_client/RedirectClient.mjs +1 -1
  66. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  67. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  68. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  69. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  70. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  71. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  72. package/dist/interaction_handler/RedirectHandler.mjs +1 -1
  73. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  74. package/dist/naa/BridgeError.mjs +1 -1
  75. package/dist/naa/BridgeProxy.mjs +1 -1
  76. package/dist/naa/BridgeStatusCode.mjs +1 -1
  77. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  78. package/dist/navigation/NavigationClient.mjs +1 -1
  79. package/dist/network/FetchClient.mjs +1 -1
  80. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  81. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  82. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  83. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  84. package/dist/packageMetadata.d.ts +1 -1
  85. package/dist/packageMetadata.mjs +2 -2
  86. package/dist/request/RequestHelpers.mjs +1 -1
  87. package/dist/response/ResponseHandler.mjs +1 -1
  88. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  89. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  90. package/dist/utils/BrowserConstants.mjs +1 -1
  91. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  92. package/dist/utils/BrowserUtils.mjs +1 -1
  93. package/lib/msal-browser.cjs +199 -188
  94. package/lib/msal-browser.cjs.map +1 -1
  95. package/lib/msal-browser.js +199 -188
  96. package/lib/msal-browser.js.map +1 -1
  97. package/lib/msal-browser.min.js +61 -61
  98. package/lib/types/app/IPublicClientApplication.d.ts +2 -1
  99. package/lib/types/app/IPublicClientApplication.d.ts.map +1 -1
  100. package/lib/types/app/PublicClientApplication.d.ts +3 -1
  101. package/lib/types/app/PublicClientApplication.d.ts.map +1 -1
  102. package/lib/types/app/PublicClientNext.d.ts +2 -1
  103. package/lib/types/app/PublicClientNext.d.ts.map +1 -1
  104. package/lib/types/controllers/IController.d.ts +2 -4
  105. package/lib/types/controllers/IController.d.ts.map +1 -1
  106. package/lib/types/controllers/NestedAppAuthController.d.ts +3 -6
  107. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  108. package/lib/types/controllers/StandardController.d.ts +7 -5
  109. package/lib/types/controllers/StandardController.d.ts.map +1 -1
  110. package/lib/types/controllers/UnknownOperatingContextController.d.ts +2 -4
  111. package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  112. package/lib/types/event/EventHandler.d.ts +6 -18
  113. package/lib/types/event/EventHandler.d.ts.map +1 -1
  114. package/lib/types/index.d.ts +1 -0
  115. package/lib/types/index.d.ts.map +1 -1
  116. package/lib/types/packageMetadata.d.ts +1 -1
  117. package/package.json +1 -1
  118. package/src/app/IPublicClientApplication.ts +5 -1
  119. package/src/app/PublicClientApplication.ts +7 -2
  120. package/src/app/PublicClientNext.ts +6 -2
  121. package/src/controllers/IController.ts +5 -5
  122. package/src/controllers/NestedAppAuthController.ts +32 -23
  123. package/src/controllers/StandardController.ts +105 -13
  124. package/src/controllers/UnknownOperatingContextController.ts +12 -14
  125. package/src/event/EventHandler.ts +42 -117
  126. package/src/index.ts +1 -0
  127. package/src/packageMetadata.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v3.25.0 2024-10-03 */
1
+ /*! @azure/msal-browser v3.26.1 2024-10-08 */
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 v14.15.0 2024-10-03 */
9
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -315,7 +315,7 @@
315
315
  // Token renewal offset default in seconds
316
316
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
317
317
 
318
- /*! @azure/msal-common v14.15.0 2024-10-03 */
318
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
319
319
  /*
320
320
  * Copyright (c) Microsoft Corporation. All rights reserved.
321
321
  * Licensed under the MIT License.
@@ -332,7 +332,7 @@
332
332
  unexpectedError: unexpectedError
333
333
  });
334
334
 
335
- /*! @azure/msal-common v14.15.0 2024-10-03 */
335
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
336
336
 
337
337
  /*
338
338
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -381,7 +381,7 @@
381
381
  : AuthErrorMessages[code]);
382
382
  }
383
383
 
384
- /*! @azure/msal-common v14.15.0 2024-10-03 */
384
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
385
385
  /*
386
386
  * Copyright (c) Microsoft Corporation. All rights reserved.
387
387
  * Licensed under the MIT License.
@@ -479,7 +479,7 @@
479
479
  userTimeoutReached: userTimeoutReached
480
480
  });
481
481
 
482
- /*! @azure/msal-common v14.15.0 2024-10-03 */
482
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
483
483
 
484
484
  /*
485
485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -731,7 +731,7 @@
731
731
  return new ClientAuthError(errorCode, additionalMessage);
732
732
  }
733
733
 
734
- /*! @azure/msal-common v14.15.0 2024-10-03 */
734
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
735
735
 
736
736
  /*
737
737
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -770,7 +770,7 @@
770
770
  },
771
771
  };
772
772
 
773
- /*! @azure/msal-common v14.15.0 2024-10-03 */
773
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
774
774
 
775
775
  /*
776
776
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -961,12 +961,12 @@
961
961
  }
962
962
  }
963
963
 
964
- /*! @azure/msal-common v14.15.0 2024-10-03 */
964
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
965
965
  /* eslint-disable header/header */
966
966
  const name$1 = "@azure/msal-common";
967
967
  const version$1 = "14.15.0";
968
968
 
969
- /*! @azure/msal-common v14.15.0 2024-10-03 */
969
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
970
970
  /*
971
971
  * Copyright (c) Microsoft Corporation. All rights reserved.
972
972
  * Licensed under the MIT License.
@@ -986,7 +986,7 @@
986
986
  AzureUsGovernment: "https://login.microsoftonline.us",
987
987
  };
988
988
 
989
- /*! @azure/msal-common v14.15.0 2024-10-03 */
989
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
990
990
 
991
991
  /*
992
992
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1047,7 +1047,7 @@
1047
1047
  }
1048
1048
  }
1049
1049
 
1050
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1050
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1051
1051
  /*
1052
1052
  * Copyright (c) Microsoft Corporation. All rights reserved.
1053
1053
  * Licensed under the MIT License.
@@ -1084,7 +1084,7 @@
1084
1084
  return cachedAtSec > nowSeconds();
1085
1085
  }
1086
1086
 
1087
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1087
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1088
1088
 
1089
1089
  /*
1090
1090
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1411,7 +1411,7 @@
1411
1411
  return metadata.expiresAt <= nowSeconds();
1412
1412
  }
1413
1413
 
1414
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1414
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1415
1415
  /*
1416
1416
  * Copyright (c) Microsoft Corporation. All rights reserved.
1417
1417
  * Licensed under the MIT License.
@@ -1465,7 +1465,7 @@
1465
1465
  urlParseError: urlParseError
1466
1466
  });
1467
1467
 
1468
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1468
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1469
1469
 
1470
1470
  /*
1471
1471
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1603,7 +1603,7 @@
1603
1603
  return new ClientConfigurationError(errorCode);
1604
1604
  }
1605
1605
 
1606
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1606
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1607
1607
  /*
1608
1608
  * Copyright (c) Microsoft Corporation. All rights reserved.
1609
1609
  * Licensed under the MIT License.
@@ -1700,7 +1700,7 @@
1700
1700
  }
1701
1701
  }
1702
1702
 
1703
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1703
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1704
1704
 
1705
1705
  /*
1706
1706
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1900,7 +1900,7 @@
1900
1900
  }
1901
1901
  }
1902
1902
 
1903
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1903
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1904
1904
 
1905
1905
  /*
1906
1906
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1940,7 +1940,7 @@
1940
1940
  };
1941
1941
  }
1942
1942
 
1943
- /*! @azure/msal-common v14.15.0 2024-10-03 */
1943
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1944
1944
  /*
1945
1945
  * Copyright (c) Microsoft Corporation. All rights reserved.
1946
1946
  * Licensed under the MIT License.
@@ -2019,7 +2019,7 @@
2019
2019
  return updatedAccountInfo;
2020
2020
  }
2021
2021
 
2022
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2022
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2023
2023
  /*
2024
2024
  * Copyright (c) Microsoft Corporation. All rights reserved.
2025
2025
  * Licensed under the MIT License.
@@ -2034,7 +2034,7 @@
2034
2034
  Ciam: 3,
2035
2035
  };
2036
2036
 
2037
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2037
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2038
2038
  /*
2039
2039
  * Copyright (c) Microsoft Corporation. All rights reserved.
2040
2040
  * Licensed under the MIT License.
@@ -2056,7 +2056,7 @@
2056
2056
  return null;
2057
2057
  }
2058
2058
 
2059
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2059
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2060
2060
  /*
2061
2061
  * Copyright (c) Microsoft Corporation. All rights reserved.
2062
2062
  * Licensed under the MIT License.
@@ -2069,7 +2069,7 @@
2069
2069
  OIDC: "OIDC",
2070
2070
  };
2071
2071
 
2072
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2072
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2073
2073
 
2074
2074
  /*
2075
2075
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2312,7 +2312,7 @@
2312
2312
  }
2313
2313
  }
2314
2314
 
2315
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2315
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2316
2316
 
2317
2317
  /*
2318
2318
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2359,7 +2359,7 @@
2359
2359
  return null;
2360
2360
  }
2361
2361
 
2362
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2362
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2363
2363
 
2364
2364
  /*
2365
2365
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2523,7 +2523,7 @@
2523
2523
  }
2524
2524
  }
2525
2525
 
2526
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2526
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2527
2527
 
2528
2528
  /*
2529
2529
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2663,7 +2663,7 @@
2663
2663
  return null;
2664
2664
  }
2665
2665
 
2666
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2666
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2667
2667
  /*
2668
2668
  * Copyright (c) Microsoft Corporation. All rights reserved.
2669
2669
  * Licensed under the MIT License.
@@ -2671,7 +2671,7 @@
2671
2671
  const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
2672
2672
  const cacheUnknownErrorCode = "cache_error_unknown";
2673
2673
 
2674
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2674
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2675
2675
 
2676
2676
  /*
2677
2677
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2698,7 +2698,7 @@
2698
2698
  }
2699
2699
  }
2700
2700
 
2701
- /*! @azure/msal-common v14.15.0 2024-10-03 */
2701
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2702
2702
 
2703
2703
  /*
2704
2704
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3950,7 +3950,7 @@
3950
3950
  }
3951
3951
  }
3952
3952
 
3953
- /*! @azure/msal-common v14.15.0 2024-10-03 */
3953
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
3954
3954
 
3955
3955
  /*
3956
3956
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4049,7 +4049,7 @@
4049
4049
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
4050
4050
  }
4051
4051
 
4052
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4052
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4053
4053
 
4054
4054
  /*
4055
4055
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4068,7 +4068,7 @@
4068
4068
  }
4069
4069
  }
4070
4070
 
4071
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4071
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4072
4072
 
4073
4073
  /*
4074
4074
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4166,7 +4166,7 @@
4166
4166
  }
4167
4167
  }
4168
4168
 
4169
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4169
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4170
4170
 
4171
4171
  /*
4172
4172
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4203,7 +4203,7 @@
4203
4203
  }
4204
4204
  }
4205
4205
 
4206
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4206
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4207
4207
  /*
4208
4208
  * Copyright (c) Microsoft Corporation. All rights reserved.
4209
4209
  * Licensed under the MIT License.
@@ -4213,7 +4213,7 @@
4213
4213
  UPN: "UPN",
4214
4214
  };
4215
4215
 
4216
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4216
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4217
4217
  /*
4218
4218
  * Copyright (c) Microsoft Corporation. All rights reserved.
4219
4219
  * Licensed under the MIT License.
@@ -4261,7 +4261,7 @@
4261
4261
  const DOMAIN_HINT = "domain_hint";
4262
4262
  const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
4263
4263
 
4264
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4264
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4265
4265
 
4266
4266
  /*
4267
4267
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4328,7 +4328,7 @@
4328
4328
  }
4329
4329
  }
4330
4330
 
4331
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4331
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4332
4332
 
4333
4333
  /*
4334
4334
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4713,7 +4713,7 @@
4713
4713
  }
4714
4714
  }
4715
4715
 
4716
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4716
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4717
4717
  /*
4718
4718
  * Copyright (c) Microsoft Corporation. All rights reserved.
4719
4719
  * Licensed under the MIT License.
@@ -4725,7 +4725,7 @@
4725
4725
  response.hasOwnProperty("jwks_uri"));
4726
4726
  }
4727
4727
 
4728
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4728
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4729
4729
  /*
4730
4730
  * Copyright (c) Microsoft Corporation. All rights reserved.
4731
4731
  * Licensed under the MIT License.
@@ -4735,7 +4735,7 @@
4735
4735
  response.hasOwnProperty("metadata"));
4736
4736
  }
4737
4737
 
4738
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4738
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4739
4739
  /*
4740
4740
  * Copyright (c) Microsoft Corporation. All rights reserved.
4741
4741
  * Licensed under the MIT License.
@@ -4745,7 +4745,7 @@
4745
4745
  response.hasOwnProperty("error_description"));
4746
4746
  }
4747
4747
 
4748
- /*! @azure/msal-common v14.15.0 2024-10-03 */
4748
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4749
4749
  /*
4750
4750
  * Copyright (c) Microsoft Corporation. All rights reserved.
4751
4751
  * Licensed under the MIT License.
@@ -5227,7 +5227,7 @@
5227
5227
  "multiMatchedRT",
5228
5228
  ]);
5229
5229
 
5230
- /*! @azure/msal-common v14.15.0 2024-10-03 */
5230
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5231
5231
  /*
5232
5232
  * Copyright (c) Microsoft Corporation. All rights reserved.
5233
5233
  * Licensed under the MIT License.
@@ -5323,7 +5323,7 @@
5323
5323
  };
5324
5324
  };
5325
5325
 
5326
- /*! @azure/msal-common v14.15.0 2024-10-03 */
5326
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5327
5327
 
5328
5328
  /*
5329
5329
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5432,7 +5432,7 @@
5432
5432
  },
5433
5433
  };
5434
5434
 
5435
- /*! @azure/msal-common v14.15.0 2024-10-03 */
5435
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5436
5436
 
5437
5437
  /*
5438
5438
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6271,7 +6271,7 @@
6271
6271
  };
6272
6272
  }
6273
6273
 
6274
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6274
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6275
6275
 
6276
6276
  /*
6277
6277
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6302,7 +6302,7 @@
6302
6302
  }
6303
6303
  }
6304
6304
 
6305
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6305
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6306
6306
 
6307
6307
  /*
6308
6308
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6405,7 +6405,7 @@
6405
6405
  }
6406
6406
  }
6407
6407
 
6408
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6408
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6409
6409
  /*
6410
6410
  * Copyright (c) Microsoft Corporation. All rights reserved.
6411
6411
  * Licensed under the MIT License.
@@ -6431,7 +6431,7 @@
6431
6431
  refreshTokenExpired: refreshTokenExpired
6432
6432
  });
6433
6433
 
6434
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6434
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6435
6435
 
6436
6436
  /*
6437
6437
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6519,7 +6519,7 @@
6519
6519
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6520
6520
  }
6521
6521
 
6522
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6522
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6523
6523
 
6524
6524
  /*
6525
6525
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6591,7 +6591,7 @@
6591
6591
  }
6592
6592
  }
6593
6593
 
6594
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6594
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6595
6595
 
6596
6596
  /*
6597
6597
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6675,7 +6675,7 @@
6675
6675
  }
6676
6676
  }
6677
6677
 
6678
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6678
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6679
6679
  /*
6680
6680
  * Copyright (c) Microsoft Corporation. All rights reserved.
6681
6681
  * Licensed under the MIT License.
@@ -6702,7 +6702,7 @@
6702
6702
  }
6703
6703
  }
6704
6704
 
6705
- /*! @azure/msal-common v14.15.0 2024-10-03 */
6705
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6706
6706
 
6707
6707
  /*
6708
6708
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7079,7 +7079,7 @@
7079
7079
  return baseAccount;
7080
7080
  }
7081
7081
 
7082
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7082
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7083
7083
  /*
7084
7084
  * Copyright (c) Microsoft Corporation. All rights reserved.
7085
7085
  * Licensed under the MIT License.
@@ -7097,7 +7097,7 @@
7097
7097
  }
7098
7098
  }
7099
7099
 
7100
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7100
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7101
7101
 
7102
7102
  /*
7103
7103
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7528,7 +7528,7 @@
7528
7528
  }
7529
7529
  }
7530
7530
 
7531
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7531
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7532
7532
 
7533
7533
  /*
7534
7534
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7742,7 +7742,7 @@
7742
7742
  }
7743
7743
  }
7744
7744
 
7745
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7745
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7746
7746
 
7747
7747
  /*
7748
7748
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7878,7 +7878,7 @@
7878
7878
  }
7879
7879
  }
7880
7880
 
7881
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7881
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7882
7882
 
7883
7883
  /*
7884
7884
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7893,7 +7893,7 @@
7893
7893
  },
7894
7894
  };
7895
7895
 
7896
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7896
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7897
7897
 
7898
7898
  /*
7899
7899
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7951,7 +7951,7 @@
7951
7951
  }
7952
7952
  }
7953
7953
 
7954
- /*! @azure/msal-common v14.15.0 2024-10-03 */
7954
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7955
7955
 
7956
7956
  /*
7957
7957
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8214,7 +8214,7 @@
8214
8214
  }
8215
8215
  }
8216
8216
 
8217
- /*! @azure/msal-common v14.15.0 2024-10-03 */
8217
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8218
8218
  /*
8219
8219
  * Copyright (c) Microsoft Corporation. All rights reserved.
8220
8220
  * Licensed under the MIT License.
@@ -8222,7 +8222,7 @@
8222
8222
  const missingKidError = "missing_kid_error";
8223
8223
  const missingAlgError = "missing_alg_error";
8224
8224
 
8225
- /*! @azure/msal-common v14.15.0 2024-10-03 */
8225
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8226
8226
 
8227
8227
  /*
8228
8228
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8247,7 +8247,7 @@
8247
8247
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
8248
8248
  }
8249
8249
 
8250
- /*! @azure/msal-common v14.15.0 2024-10-03 */
8250
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8251
8251
 
8252
8252
  /*
8253
8253
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8287,7 +8287,7 @@
8287
8287
  }
8288
8288
  }
8289
8289
 
8290
- /*! @azure/msal-common v14.15.0 2024-10-03 */
8290
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8291
8291
 
8292
8292
  /*
8293
8293
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8366,7 +8366,7 @@
8366
8366
  }
8367
8367
  }
8368
8368
 
8369
- /*! @azure/msal-common v14.15.0 2024-10-03 */
8369
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8370
8370
 
8371
8371
  /*
8372
8372
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10238,7 +10238,7 @@
10238
10238
 
10239
10239
  /* eslint-disable header/header */
10240
10240
  const name = "@azure/msal-browser";
10241
- const version = "3.25.0";
10241
+ const version = "3.26.1";
10242
10242
 
10243
10243
  /*
10244
10244
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12709,24 +12709,26 @@
12709
12709
  * Licensed under the MIT License.
12710
12710
  */
12711
12711
  class EventHandler {
12712
- constructor(logger, browserCrypto) {
12712
+ constructor(logger) {
12713
12713
  this.eventCallbacks = new Map();
12714
- this.logger = logger;
12715
- this.browserCrypto = browserCrypto;
12716
- this.listeningToStorageEvents = false;
12717
- this.handleAccountCacheChange =
12718
- this.handleAccountCacheChange.bind(this);
12714
+ this.logger = logger || new Logger({});
12719
12715
  }
12720
12716
  /**
12721
12717
  * Adds event callbacks to array
12722
- * @param callback
12718
+ * @param callback - callback to be invoked when an event is raised
12719
+ * @param eventTypes - list of events that this callback will be invoked for, if not provided callback will be invoked for all events
12720
+ * @param callbackId - Identifier for the callback, used to locate and remove the callback when no longer required
12723
12721
  */
12724
- addEventCallback(callback) {
12722
+ addEventCallback(callback, eventTypes, callbackId) {
12725
12723
  if (typeof window !== "undefined") {
12726
- const callbackId = createNewGuid();
12727
- this.eventCallbacks.set(callbackId, callback);
12728
- this.logger.verbose(`Event callback registered with id: ${callbackId}`);
12729
- return callbackId;
12724
+ const id = callbackId || createGuid();
12725
+ if (this.eventCallbacks.has(id)) {
12726
+ this.logger.error(`Event callback with id: ${id} is already registered. Please provide a unique id or remove the existing callback and try again.`);
12727
+ return null;
12728
+ }
12729
+ this.eventCallbacks.set(id, [callback, eventTypes || []]);
12730
+ this.logger.verbose(`Event callback registered with id: ${id}`);
12731
+ return id;
12730
12732
  }
12731
12733
  return null;
12732
12734
  }
@@ -12738,38 +12740,6 @@
12738
12740
  this.eventCallbacks.delete(callbackId);
12739
12741
  this.logger.verbose(`Event callback ${callbackId} removed.`);
12740
12742
  }
12741
- /**
12742
- * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
12743
- */
12744
- enableAccountStorageEvents() {
12745
- if (typeof window === "undefined") {
12746
- return;
12747
- }
12748
- if (!this.listeningToStorageEvents) {
12749
- this.logger.verbose("Adding account storage listener.");
12750
- this.listeningToStorageEvents = true;
12751
- window.addEventListener("storage", this.handleAccountCacheChange);
12752
- }
12753
- else {
12754
- this.logger.verbose("Account storage listener already registered.");
12755
- }
12756
- }
12757
- /**
12758
- * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
12759
- */
12760
- disableAccountStorageEvents() {
12761
- if (typeof window === "undefined") {
12762
- return;
12763
- }
12764
- if (this.listeningToStorageEvents) {
12765
- this.logger.verbose("Removing account storage listener.");
12766
- window.removeEventListener("storage", this.handleAccountCacheChange);
12767
- this.listeningToStorageEvents = false;
12768
- }
12769
- else {
12770
- this.logger.verbose("No account storage listener registered.");
12771
- }
12772
- }
12773
12743
  /**
12774
12744
  * Emits events by calling callback with event message
12775
12745
  * @param eventType
@@ -12786,48 +12756,15 @@
12786
12756
  error: error || null,
12787
12757
  timestamp: Date.now(),
12788
12758
  };
12789
- this.logger.info(`Emitting event: ${eventType}`);
12790
- this.eventCallbacks.forEach((callback, callbackId) => {
12791
- this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);
12792
- callback.apply(null, [message]);
12759
+ this.eventCallbacks.forEach(([callback, eventTypes], callbackId) => {
12760
+ if (eventTypes.length === 0 ||
12761
+ eventTypes.includes(eventType)) {
12762
+ this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);
12763
+ callback.apply(null, [message]);
12764
+ }
12793
12765
  });
12794
12766
  }
12795
12767
  }
12796
- /**
12797
- * Emit account added/removed events when cached accounts are changed in a different tab or frame
12798
- */
12799
- handleAccountCacheChange(e) {
12800
- try {
12801
- // Handle active account filter change
12802
- if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
12803
- // This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
12804
- this.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
12805
- }
12806
- // Handle account object change
12807
- const cacheValue = e.newValue || e.oldValue;
12808
- if (!cacheValue) {
12809
- return;
12810
- }
12811
- const parsedValue = JSON.parse(cacheValue);
12812
- if (typeof parsedValue !== "object" ||
12813
- !AccountEntity.isAccountEntity(parsedValue)) {
12814
- return;
12815
- }
12816
- const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
12817
- const accountInfo = accountEntity.getAccountInfo();
12818
- if (!e.oldValue && e.newValue) {
12819
- this.logger.info("Account was added to cache in a different window");
12820
- this.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
12821
- }
12822
- else if (!e.newValue && e.oldValue) {
12823
- this.logger.info("Account was removed from cache in a different window");
12824
- this.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
12825
- }
12826
- }
12827
- catch (e) {
12828
- return;
12829
- }
12830
- }
12831
12768
  }
12832
12769
 
12833
12770
  /*
@@ -15989,7 +15926,7 @@
15989
15926
  this.browserCrypto = this.isBrowserEnvironment
15990
15927
  ? new CryptoOps(this.logger, this.performanceClient)
15991
15928
  : DEFAULT_CRYPTO_IMPLEMENTATION;
15992
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
15929
+ this.eventHandler = new EventHandler(this.logger);
15993
15930
  // Initialize the browser storage class.
15994
15931
  this.browserStorage = this.isBrowserEnvironment
15995
15932
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth), this.performanceClient)
@@ -16012,6 +15949,10 @@
16012
15949
  // Register listener functions
16013
15950
  this.trackPageVisibilityWithMeasurement =
16014
15951
  this.trackPageVisibilityWithMeasurement.bind(this);
15952
+ // account storage events
15953
+ this.listeningToStorageEvents = false;
15954
+ this.handleAccountCacheChange =
15955
+ this.handleAccountCacheChange.bind(this);
16015
15956
  }
16016
15957
  static async createController(operatingContext, request) {
16017
15958
  const controller = new StandardController(operatingContext);
@@ -16035,6 +15976,12 @@
16035
15976
  this.logger.info("initialize has already been called, exiting early.");
16036
15977
  return;
16037
15978
  }
15979
+ if (!this.isBrowserEnvironment) {
15980
+ this.logger.info("in non-browser environment, exiting early.");
15981
+ this.initialized = true;
15982
+ this.eventHandler.emitEvent(EventType.INITIALIZE_END);
15983
+ return;
15984
+ }
16038
15985
  const initCorrelationId = request?.correlationId || this.getRequestCorrelationId();
16039
15986
  const allowNativeBroker = this.config.system.allowNativeBroker;
16040
15987
  const initMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.InitializeClientApplication, initCorrelationId);
@@ -16684,6 +16631,10 @@
16684
16631
  * @param logoutRequest
16685
16632
  */
16686
16633
  async clearCache(logoutRequest) {
16634
+ if (!this.isBrowserEnvironment) {
16635
+ this.logger.info("in non-browser environment, returning early.");
16636
+ return;
16637
+ }
16687
16638
  const correlationId = this.getRequestCorrelationId(logoutRequest);
16688
16639
  const cacheClient = this.createSilentCacheClient(correlationId);
16689
16640
  return cacheClient.logout(logoutRequest);
@@ -16869,8 +16820,8 @@
16869
16820
  * Adds event callbacks to array
16870
16821
  * @param callback
16871
16822
  */
16872
- addEventCallback(callback) {
16873
- return this.eventHandler.addEventCallback(callback);
16823
+ addEventCallback(callback, eventTypes) {
16824
+ return this.eventHandler.addEventCallback(callback, eventTypes);
16874
16825
  }
16875
16826
  /**
16876
16827
  * Removes callback with provided id from callback array
@@ -16886,6 +16837,7 @@
16886
16837
  * @returns {string}
16887
16838
  */
16888
16839
  addPerformanceCallback(callback) {
16840
+ blockNonBrowserEnvironment();
16889
16841
  return this.performanceClient.addPerformanceCallback(callback);
16890
16842
  }
16891
16843
  /**
@@ -16901,13 +16853,68 @@
16901
16853
  * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
16902
16854
  */
16903
16855
  enableAccountStorageEvents() {
16904
- this.eventHandler.enableAccountStorageEvents();
16856
+ if (typeof window === "undefined") {
16857
+ return;
16858
+ }
16859
+ if (!this.listeningToStorageEvents) {
16860
+ this.logger.verbose("Adding account storage listener.");
16861
+ this.listeningToStorageEvents = true;
16862
+ window.addEventListener("storage", this.handleAccountCacheChange);
16863
+ }
16864
+ else {
16865
+ this.logger.verbose("Account storage listener already registered.");
16866
+ }
16905
16867
  }
16906
16868
  /**
16907
16869
  * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
16908
16870
  */
16909
16871
  disableAccountStorageEvents() {
16910
- this.eventHandler.disableAccountStorageEvents();
16872
+ if (typeof window === "undefined") {
16873
+ return;
16874
+ }
16875
+ if (this.listeningToStorageEvents) {
16876
+ this.logger.verbose("Removing account storage listener.");
16877
+ window.removeEventListener("storage", this.handleAccountCacheChange);
16878
+ this.listeningToStorageEvents = false;
16879
+ }
16880
+ else {
16881
+ this.logger.verbose("No account storage listener registered.");
16882
+ }
16883
+ }
16884
+ /**
16885
+ * Emit account added/removed events when cached accounts are changed in a different tab or frame
16886
+ */
16887
+ handleAccountCacheChange(e) {
16888
+ try {
16889
+ // Handle active account filter change
16890
+ if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
16891
+ // This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
16892
+ this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
16893
+ }
16894
+ // Handle account object change
16895
+ const cacheValue = e.newValue || e.oldValue;
16896
+ if (!cacheValue) {
16897
+ return;
16898
+ }
16899
+ const parsedValue = JSON.parse(cacheValue);
16900
+ if (typeof parsedValue !== "object" ||
16901
+ !AccountEntity.isAccountEntity(parsedValue)) {
16902
+ return;
16903
+ }
16904
+ const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
16905
+ const accountInfo = accountEntity.getAccountInfo();
16906
+ if (!e.oldValue && e.newValue) {
16907
+ this.logger.info("Account was added to cache in a different window");
16908
+ this.eventHandler.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
16909
+ }
16910
+ else if (!e.newValue && e.oldValue) {
16911
+ this.logger.info("Account was removed from cache in a different window");
16912
+ this.eventHandler.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
16913
+ }
16914
+ }
16915
+ catch (e) {
16916
+ return;
16917
+ }
16911
16918
  }
16912
16919
  /**
16913
16920
  * Gets the token cache for the application.
@@ -16962,12 +16969,6 @@
16962
16969
  isBrowserEnv() {
16963
16970
  return this.isBrowserEnvironment;
16964
16971
  }
16965
- /**
16966
- * Returns the event handler
16967
- */
16968
- getEventHandler() {
16969
- return this.eventHandler;
16970
- }
16971
16972
  /**
16972
16973
  * Generates a correlation id for a request if none is provided.
16973
16974
  *
@@ -17493,7 +17494,7 @@
17493
17494
  this.browserStorage = this.operatingContext.isBrowserEnvironment()
17494
17495
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth))
17495
17496
  : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
17496
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
17497
+ this.eventHandler = new EventHandler(this.logger);
17497
17498
  this.nestedAppAuthAdapter = new NestedAppAuthAdapter(this.config.auth.clientId, this.config.auth.clientCapabilities, this.browserCrypto, this.logger);
17498
17499
  // Set the active account if available
17499
17500
  const accountContext = this.bridgeProxy.getAccountContext();
@@ -17502,13 +17503,6 @@
17502
17503
  setActiveAccount(cachedAccount, this.browserStorage);
17503
17504
  }
17504
17505
  }
17505
- /**
17506
- * Returns the event handler instance
17507
- * @returns EventHandler
17508
- */
17509
- getEventHandler() {
17510
- return this.eventHandler;
17511
- }
17512
17506
  /**
17513
17507
  * Factory function to create a new instance of NestedAppAuthController
17514
17508
  * @param operatingContext
@@ -17554,7 +17548,9 @@
17554
17548
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(validRequest);
17555
17549
  const reqTimestamp = nowSeconds();
17556
17550
  const response = await this.bridgeProxy.getTokenInteractive(naaRequest);
17557
- const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
17551
+ const result = {
17552
+ ...this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp),
17553
+ };
17558
17554
  // cache the tokens in the response
17559
17555
  await this.hydrateCache(result, request);
17560
17556
  this.browserStorage.setActiveAccount(result.account);
@@ -17638,7 +17634,22 @@
17638
17634
  atsMeasurement?.add({
17639
17635
  nestedAppAuthRequest: true,
17640
17636
  });
17641
- const result = await this.acquireTokenFromCacheInternal(request);
17637
+ // if the request has claims, we cannot look up in the cache
17638
+ if (request.claims) {
17639
+ this.logger.verbose("Claims are present in the request, skipping cache lookup");
17640
+ return null;
17641
+ }
17642
+ // respect cache lookup policy
17643
+ let result = null;
17644
+ switch (request.cacheLookupPolicy) {
17645
+ case CacheLookupPolicy.Default:
17646
+ case CacheLookupPolicy.AccessToken:
17647
+ case CacheLookupPolicy.AccessTokenAndRefreshToken:
17648
+ result = await this.acquireTokenFromCacheInternal(request);
17649
+ break;
17650
+ default:
17651
+ return null;
17652
+ }
17642
17653
  if (result) {
17643
17654
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
17644
17655
  atsMeasurement?.add({
@@ -17691,13 +17702,10 @@
17691
17702
  if (!cachedAccessToken) {
17692
17703
  this.logger.verbose("No cached access token found");
17693
17704
  return Promise.resolve(null);
17694
- // If access token has expired, remove the token from cache and return null
17695
17705
  }
17696
17706
  else if (wasClockTurnedBack(cachedAccessToken.cachedAt) ||
17697
17707
  isTokenExpired(cachedAccessToken.expiresOn, this.config.system.tokenRenewalOffsetSeconds)) {
17698
- this.logger.verbose("Cached access token has expired, deleting all related tokens from cache");
17699
- const accountEntity = AccountEntity.createFromAccountInfo(currentAccount);
17700
- await this.browserStorage.removeAccountContext(accountEntity);
17708
+ this.logger.verbose("Cached access token has expired");
17701
17709
  return Promise.resolve(null);
17702
17710
  }
17703
17711
  const cachedIdToken = this.browserStorage.getIdToken(currentAccount, tokenKeys, currentAccount.tenantId, this.performanceClient, authRequest.correlationId);
@@ -17764,9 +17772,10 @@
17764
17772
  /**
17765
17773
  * Adds event callbacks to array
17766
17774
  * @param callback
17775
+ * @param eventTypes
17767
17776
  */
17768
- addEventCallback(callback) {
17769
- return this.eventHandler.addEventCallback(callback);
17777
+ addEventCallback(callback, eventTypes) {
17778
+ return this.eventHandler.addEventCallback(callback, eventTypes);
17770
17779
  }
17771
17780
  /**
17772
17781
  * Removes callback with provided id from callback array
@@ -18065,9 +18074,10 @@
18065
18074
  /**
18066
18075
  * Adds event callbacks to array
18067
18076
  * @param callback
18077
+ * @param eventTypes
18068
18078
  */
18069
- addEventCallback(callback) {
18070
- return this.controller.addEventCallback(callback);
18079
+ addEventCallback(callback, eventTypes) {
18080
+ return this.controller.addEventCallback(callback, eventTypes);
18071
18081
  }
18072
18082
  /**
18073
18083
  * Removes callback with provided id from callback array
@@ -18367,14 +18377,10 @@
18367
18377
  this.browserStorage = this.isBrowserEnvironment
18368
18378
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, undefined, this.performanceClient)
18369
18379
  : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
18370
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
18371
18380
  }
18372
18381
  getBrowserStorage() {
18373
18382
  return this.browserStorage;
18374
18383
  }
18375
- getEventHandler() {
18376
- return this.eventHandler;
18377
- }
18378
18384
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18379
18385
  getAccount(accountFilter) {
18380
18386
  return null;
@@ -18444,12 +18450,16 @@
18444
18450
  blockNonBrowserEnvironment();
18445
18451
  return {};
18446
18452
  }
18447
- addEventCallback(callback) {
18448
- return this.eventHandler.addEventCallback(callback);
18449
- }
18450
- removeEventCallback(callbackId) {
18451
- this.eventHandler.removeEventCallback(callbackId);
18453
+ addEventCallback(
18454
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18455
+ callback,
18456
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18457
+ eventTypes) {
18458
+ return null;
18452
18459
  }
18460
+ removeEventCallback(
18461
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18462
+ callbackId) { }
18453
18463
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18454
18464
  addPerformanceCallback(callback) {
18455
18465
  blockAPICallsBeforeInitialize(this.initialized);
@@ -18750,8 +18760,8 @@
18750
18760
  * Adds event callbacks to array
18751
18761
  * @param callback
18752
18762
  */
18753
- addEventCallback(callback) {
18754
- return this.controller.addEventCallback(callback);
18763
+ addEventCallback(callback, eventTypes) {
18764
+ return this.controller.addEventCallback(callback, eventTypes);
18755
18765
  }
18756
18766
  /**
18757
18767
  * Removes callback with provided id from callback array
@@ -19488,6 +19498,7 @@
19488
19498
  exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
19489
19499
  exports.ClientConfigurationErrorMessage = ClientConfigurationErrorMessage;
19490
19500
  exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
19501
+ exports.EventHandler = EventHandler;
19491
19502
  exports.EventMessageUtils = EventMessageUtils;
19492
19503
  exports.EventType = EventType;
19493
19504
  exports.InteractionRequiredAuthError = InteractionRequiredAuthError;