@azure/msal-browser 3.21.0 → 3.22.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.
Files changed (109) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/cache/AccountManager.mjs +1 -1
  7. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  8. package/dist/cache/BrowserCacheManager.d.ts +0 -25
  9. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  10. package/dist/cache/BrowserCacheManager.mjs +1 -71
  11. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  12. package/dist/cache/BrowserStorage.mjs +1 -1
  13. package/dist/cache/DatabaseStorage.mjs +1 -1
  14. package/dist/cache/MemoryStorage.mjs +1 -1
  15. package/dist/cache/TokenCache.mjs +1 -1
  16. package/dist/config/Configuration.mjs +1 -1
  17. package/dist/controllers/ControllerFactory.mjs +1 -1
  18. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  19. package/dist/controllers/StandardController.mjs +1 -1
  20. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  21. package/dist/crypto/BrowserCrypto.mjs +1 -1
  22. package/dist/crypto/CryptoOps.mjs +1 -1
  23. package/dist/crypto/PkceGenerator.mjs +1 -1
  24. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  25. package/dist/encode/Base64Decode.mjs +1 -1
  26. package/dist/encode/Base64Encode.mjs +1 -1
  27. package/dist/error/BrowserAuthError.d.ts +0 -1
  28. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  29. package/dist/error/BrowserAuthError.mjs +2 -3
  30. package/dist/error/BrowserAuthError.mjs.map +1 -1
  31. package/dist/error/BrowserAuthErrorCodes.d.ts +0 -1
  32. package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
  33. package/dist/error/BrowserAuthErrorCodes.mjs +3 -4
  34. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
  35. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  36. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  37. package/dist/error/NativeAuthError.mjs +1 -1
  38. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  39. package/dist/error/NestedAppAuthError.mjs +1 -1
  40. package/dist/event/EventHandler.mjs +1 -1
  41. package/dist/event/EventMessage.mjs +1 -1
  42. package/dist/event/EventType.mjs +1 -1
  43. package/dist/index.mjs +1 -1
  44. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  45. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  46. package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
  47. package/dist/interaction_client/PopupClient.d.ts +2 -15
  48. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  49. package/dist/interaction_client/PopupClient.mjs +55 -81
  50. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  51. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  52. package/dist/interaction_client/RedirectClient.mjs +5 -36
  53. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  54. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  55. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  56. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  57. package/dist/interaction_client/SilentIframeClient.mjs +3 -3
  58. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  59. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  60. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  61. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  62. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  63. package/dist/interaction_handler/RedirectHandler.mjs +1 -2
  64. package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
  65. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  66. package/dist/naa/BridgeError.mjs +1 -1
  67. package/dist/naa/BridgeProxy.d.ts.map +1 -1
  68. package/dist/naa/BridgeProxy.mjs +3 -8
  69. package/dist/naa/BridgeProxy.mjs.map +1 -1
  70. package/dist/naa/BridgeStatusCode.mjs +1 -1
  71. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  72. package/dist/navigation/NavigationClient.mjs +1 -1
  73. package/dist/network/FetchClient.mjs +1 -1
  74. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  75. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  76. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  77. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  78. package/dist/packageMetadata.d.ts +1 -1
  79. package/dist/packageMetadata.mjs +2 -2
  80. package/dist/request/RequestHelpers.mjs +1 -1
  81. package/dist/response/ResponseHandler.mjs +1 -1
  82. package/dist/telemetry/BrowserPerformanceClient.d.ts +0 -4
  83. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  84. package/dist/telemetry/BrowserPerformanceClient.mjs +2 -2
  85. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  86. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  87. package/dist/utils/BrowserConstants.d.ts +0 -2
  88. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  89. package/dist/utils/BrowserConstants.mjs +1 -3
  90. package/dist/utils/BrowserConstants.mjs.map +1 -1
  91. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  92. package/dist/utils/BrowserUtils.mjs +1 -1
  93. package/lib/msal-browser.cjs +287 -428
  94. package/lib/msal-browser.cjs.map +1 -1
  95. package/lib/msal-browser.js +287 -428
  96. package/lib/msal-browser.js.map +1 -1
  97. package/lib/msal-browser.min.js +62 -62
  98. package/package.json +2 -2
  99. package/src/cache/BrowserCacheManager.ts +0 -95
  100. package/src/error/BrowserAuthError.ts +0 -2
  101. package/src/error/BrowserAuthErrorCodes.ts +0 -1
  102. package/src/interaction_client/PopupClient.ts +118 -202
  103. package/src/interaction_client/RedirectClient.ts +1 -58
  104. package/src/interaction_client/SilentIframeClient.ts +1 -2
  105. package/src/interaction_handler/RedirectHandler.ts +0 -1
  106. package/src/naa/BridgeProxy.ts +2 -7
  107. package/src/packageMetadata.ts +1 -1
  108. package/src/telemetry/BrowserPerformanceClient.ts +1 -1
  109. package/src/utils/BrowserConstants.ts +0 -2
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v3.21.0 2024-08-13 */
1
+ /*! @azure/msal-browser v3.22.0 2024-08-28 */
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.14.1 2024-08-13 */
9
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
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.14.1 2024-08-13 */
318
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
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.14.1 2024-08-13 */
335
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
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.14.1 2024-08-13 */
384
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
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.14.1 2024-08-13 */
482
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
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.14.1 2024-08-13 */
734
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
735
735
 
736
736
  /*
737
737
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -792,7 +792,7 @@
792
792
  }
793
793
  }
794
794
 
795
- /*! @azure/msal-common v14.14.1 2024-08-13 */
795
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
796
796
  /*
797
797
  * Copyright (c) Microsoft Corporation. All rights reserved.
798
798
  * Licensed under the MIT License.
@@ -807,7 +807,7 @@
807
807
  Ciam: 3,
808
808
  };
809
809
 
810
- /*! @azure/msal-common v14.14.1 2024-08-13 */
810
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
811
811
  /*
812
812
  * Copyright (c) Microsoft Corporation. All rights reserved.
813
813
  * Licensed under the MIT License.
@@ -819,7 +819,7 @@
819
819
  response.hasOwnProperty("jwks_uri"));
820
820
  }
821
821
 
822
- /*! @azure/msal-common v14.14.1 2024-08-13 */
822
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
823
823
  /*
824
824
  * Copyright (c) Microsoft Corporation. All rights reserved.
825
825
  * Licensed under the MIT License.
@@ -873,7 +873,7 @@
873
873
  urlParseError: urlParseError
874
874
  });
875
875
 
876
- /*! @azure/msal-common v14.14.1 2024-08-13 */
876
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
877
877
 
878
878
  /*
879
879
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1011,7 +1011,7 @@
1011
1011
  return new ClientConfigurationError(errorCode);
1012
1012
  }
1013
1013
 
1014
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1014
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1015
1015
  /*
1016
1016
  * Copyright (c) Microsoft Corporation. All rights reserved.
1017
1017
  * Licensed under the MIT License.
@@ -1108,7 +1108,7 @@
1108
1108
  }
1109
1109
  }
1110
1110
 
1111
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1111
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1112
1112
 
1113
1113
  /*
1114
1114
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1155,7 +1155,7 @@
1155
1155
  return null;
1156
1156
  }
1157
1157
 
1158
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1158
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1159
1159
 
1160
1160
  /*
1161
1161
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1319,7 +1319,7 @@
1319
1319
  }
1320
1320
  }
1321
1321
 
1322
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1322
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1323
1323
 
1324
1324
  /*
1325
1325
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1459,7 +1459,7 @@
1459
1459
  return null;
1460
1460
  }
1461
1461
 
1462
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1462
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1463
1463
  /*
1464
1464
  * Copyright (c) Microsoft Corporation. All rights reserved.
1465
1465
  * Licensed under the MIT License.
@@ -1472,7 +1472,7 @@
1472
1472
  OIDC: "OIDC",
1473
1473
  };
1474
1474
 
1475
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1475
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1476
1476
  /*
1477
1477
  * Copyright (c) Microsoft Corporation. All rights reserved.
1478
1478
  * Licensed under the MIT License.
@@ -1492,7 +1492,7 @@
1492
1492
  AzureUsGovernment: "https://login.microsoftonline.us",
1493
1493
  };
1494
1494
 
1495
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1495
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1496
1496
  /*
1497
1497
  * Copyright (c) Microsoft Corporation. All rights reserved.
1498
1498
  * Licensed under the MIT License.
@@ -1502,7 +1502,7 @@
1502
1502
  response.hasOwnProperty("metadata"));
1503
1503
  }
1504
1504
 
1505
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1505
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1506
1506
  /*
1507
1507
  * Copyright (c) Microsoft Corporation. All rights reserved.
1508
1508
  * Licensed under the MIT License.
@@ -1512,7 +1512,7 @@
1512
1512
  response.hasOwnProperty("error_description"));
1513
1513
  }
1514
1514
 
1515
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1515
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
1516
1516
  /*
1517
1517
  * Copyright (c) Microsoft Corporation. All rights reserved.
1518
1518
  * Licensed under the MIT License.
@@ -1669,10 +1669,6 @@
1669
1669
  */
1670
1670
  InitializeSilentRequest: "initializeSilentRequest",
1671
1671
  InitializeClientApplication: "initializeClientApplication",
1672
- /**
1673
- * Helper function in PopupClient class (msal-browser).
1674
- */
1675
- PopupClientTokenHelper: "popupClientTokenHelper",
1676
1672
  /**
1677
1673
  * Helper function in SilentIframeClient class (msal-browser).
1678
1674
  */
@@ -1998,7 +1994,7 @@
1998
1994
  "multiMatchedRT",
1999
1995
  ]);
2000
1996
 
2001
- /*! @azure/msal-common v14.14.1 2024-08-13 */
1997
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
2002
1998
  /*
2003
1999
  * Copyright (c) Microsoft Corporation. All rights reserved.
2004
2000
  * Licensed under the MIT License.
@@ -2094,7 +2090,7 @@
2094
2090
  };
2095
2091
  };
2096
2092
 
2097
- /*! @azure/msal-common v14.14.1 2024-08-13 */
2093
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
2098
2094
 
2099
2095
  /*
2100
2096
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2203,7 +2199,7 @@
2203
2199
  },
2204
2200
  };
2205
2201
 
2206
- /*! @azure/msal-common v14.14.1 2024-08-13 */
2202
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
2207
2203
  /*
2208
2204
  * Copyright (c) Microsoft Corporation. All rights reserved.
2209
2205
  * Licensed under the MIT License.
@@ -2240,7 +2236,7 @@
2240
2236
  return cachedAtSec > nowSeconds();
2241
2237
  }
2242
2238
 
2243
- /*! @azure/msal-common v14.14.1 2024-08-13 */
2239
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
2244
2240
 
2245
2241
  /*
2246
2242
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2567,7 +2563,7 @@
2567
2563
  return metadata.expiresAt <= nowSeconds();
2568
2564
  }
2569
2565
 
2570
- /*! @azure/msal-common v14.14.1 2024-08-13 */
2566
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
2571
2567
 
2572
2568
  /*
2573
2569
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3406,7 +3402,7 @@
3406
3402
  };
3407
3403
  }
3408
3404
 
3409
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3405
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3410
3406
 
3411
3407
  /*
3412
3408
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3437,7 +3433,7 @@
3437
3433
  }
3438
3434
  }
3439
3435
 
3440
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3436
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3441
3437
  /*
3442
3438
  * Copyright (c) Microsoft Corporation. All rights reserved.
3443
3439
  * Licensed under the MIT License.
@@ -3455,7 +3451,7 @@
3455
3451
  }
3456
3452
  }
3457
3453
 
3458
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3454
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3459
3455
  /*
3460
3456
  * Copyright (c) Microsoft Corporation. All rights reserved.
3461
3457
  * Licensed under the MIT License.
@@ -3503,7 +3499,7 @@
3503
3499
  const DOMAIN_HINT = "domain_hint";
3504
3500
  const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
3505
3501
 
3506
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3502
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3507
3503
 
3508
3504
  /*
3509
3505
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3542,7 +3538,7 @@
3542
3538
  },
3543
3539
  };
3544
3540
 
3545
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3541
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3546
3542
 
3547
3543
  /*
3548
3544
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3733,12 +3729,12 @@
3733
3729
  }
3734
3730
  }
3735
3731
 
3736
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3732
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3737
3733
  /* eslint-disable header/header */
3738
3734
  const name$1 = "@azure/msal-common";
3739
- const version$1 = "14.14.1";
3735
+ const version$1 = "14.14.2";
3740
3736
 
3741
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3737
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3742
3738
 
3743
3739
  /*
3744
3740
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3938,7 +3934,7 @@
3938
3934
  }
3939
3935
  }
3940
3936
 
3941
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3937
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3942
3938
 
3943
3939
  /*
3944
3940
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3978,7 +3974,7 @@
3978
3974
  };
3979
3975
  }
3980
3976
 
3981
- /*! @azure/msal-common v14.14.1 2024-08-13 */
3977
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
3982
3978
  /*
3983
3979
  * Copyright (c) Microsoft Corporation. All rights reserved.
3984
3980
  * Licensed under the MIT License.
@@ -4057,7 +4053,7 @@
4057
4053
  return updatedAccountInfo;
4058
4054
  }
4059
4055
 
4060
- /*! @azure/msal-common v14.14.1 2024-08-13 */
4056
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
4061
4057
  /*
4062
4058
  * Copyright (c) Microsoft Corporation. All rights reserved.
4063
4059
  * Licensed under the MIT License.
@@ -4079,7 +4075,7 @@
4079
4075
  return null;
4080
4076
  }
4081
4077
 
4082
- /*! @azure/msal-common v14.14.1 2024-08-13 */
4078
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
4083
4079
 
4084
4080
  /*
4085
4081
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4322,7 +4318,7 @@
4322
4318
  }
4323
4319
  }
4324
4320
 
4325
- /*! @azure/msal-common v14.14.1 2024-08-13 */
4321
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
4326
4322
  /*
4327
4323
  * Copyright (c) Microsoft Corporation. All rights reserved.
4328
4324
  * Licensed under the MIT License.
@@ -4330,7 +4326,7 @@
4330
4326
  const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
4331
4327
  const cacheUnknownErrorCode = "cache_error_unknown";
4332
4328
 
4333
- /*! @azure/msal-common v14.14.1 2024-08-13 */
4329
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
4334
4330
 
4335
4331
  /*
4336
4332
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4357,7 +4353,7 @@
4357
4353
  }
4358
4354
  }
4359
4355
 
4360
- /*! @azure/msal-common v14.14.1 2024-08-13 */
4356
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
4361
4357
 
4362
4358
  /*
4363
4359
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5609,7 +5605,7 @@
5609
5605
  }
5610
5606
  }
5611
5607
 
5612
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5608
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5613
5609
 
5614
5610
  /*
5615
5611
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5707,7 +5703,7 @@
5707
5703
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5708
5704
  }
5709
5705
 
5710
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5706
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5711
5707
 
5712
5708
  /*
5713
5709
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5726,7 +5722,7 @@
5726
5722
  }
5727
5723
  }
5728
5724
 
5729
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5725
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5730
5726
 
5731
5727
  /*
5732
5728
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5824,7 +5820,7 @@
5824
5820
  }
5825
5821
  }
5826
5822
 
5827
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5823
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5828
5824
 
5829
5825
  /*
5830
5826
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5861,7 +5857,7 @@
5861
5857
  }
5862
5858
  }
5863
5859
 
5864
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5860
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5865
5861
  /*
5866
5862
  * Copyright (c) Microsoft Corporation. All rights reserved.
5867
5863
  * Licensed under the MIT License.
@@ -5871,7 +5867,7 @@
5871
5867
  UPN: "UPN",
5872
5868
  };
5873
5869
 
5874
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5870
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5875
5871
 
5876
5872
  /*
5877
5873
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5938,7 +5934,7 @@
5938
5934
  }
5939
5935
  }
5940
5936
 
5941
- /*! @azure/msal-common v14.14.1 2024-08-13 */
5937
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
5942
5938
 
5943
5939
  /*
5944
5940
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6323,7 +6319,7 @@
6323
6319
  }
6324
6320
  }
6325
6321
 
6326
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6322
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6327
6323
 
6328
6324
  /*
6329
6325
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6426,7 +6422,7 @@
6426
6422
  }
6427
6423
  }
6428
6424
 
6429
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6425
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6430
6426
  /*
6431
6427
  * Copyright (c) Microsoft Corporation. All rights reserved.
6432
6428
  * Licensed under the MIT License.
@@ -6452,7 +6448,7 @@
6452
6448
  refreshTokenExpired: refreshTokenExpired
6453
6449
  });
6454
6450
 
6455
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6451
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6456
6452
 
6457
6453
  /*
6458
6454
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6540,7 +6536,7 @@
6540
6536
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6541
6537
  }
6542
6538
 
6543
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6539
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6544
6540
 
6545
6541
  /*
6546
6542
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6612,7 +6608,7 @@
6612
6608
  }
6613
6609
  }
6614
6610
 
6615
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6611
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6616
6612
 
6617
6613
  /*
6618
6614
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6696,7 +6692,7 @@
6696
6692
  }
6697
6693
  }
6698
6694
 
6699
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6695
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6700
6696
  /*
6701
6697
  * Copyright (c) Microsoft Corporation. All rights reserved.
6702
6698
  * Licensed under the MIT License.
@@ -6723,7 +6719,7 @@
6723
6719
  }
6724
6720
  }
6725
6721
 
6726
- /*! @azure/msal-common v14.14.1 2024-08-13 */
6722
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
6727
6723
 
6728
6724
  /*
6729
6725
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7100,7 +7096,7 @@
7100
7096
  return baseAccount;
7101
7097
  }
7102
7098
 
7103
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7099
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7104
7100
 
7105
7101
  /*
7106
7102
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7523,7 +7519,7 @@
7523
7519
  }
7524
7520
  }
7525
7521
 
7526
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7522
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7527
7523
 
7528
7524
  /*
7529
7525
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7737,7 +7733,7 @@
7737
7733
  }
7738
7734
  }
7739
7735
 
7740
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7736
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7741
7737
 
7742
7738
  /*
7743
7739
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7873,7 +7869,7 @@
7873
7869
  }
7874
7870
  }
7875
7871
 
7876
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7872
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7877
7873
 
7878
7874
  /*
7879
7875
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7888,7 +7884,7 @@
7888
7884
  },
7889
7885
  };
7890
7886
 
7891
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7887
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7892
7888
  /*
7893
7889
  * Copyright (c) Microsoft Corporation. All rights reserved.
7894
7890
  * Licensed under the MIT License.
@@ -7896,7 +7892,7 @@
7896
7892
  const missingKidError = "missing_kid_error";
7897
7893
  const missingAlgError = "missing_alg_error";
7898
7894
 
7899
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7895
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7900
7896
 
7901
7897
  /*
7902
7898
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7921,7 +7917,7 @@
7921
7917
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
7922
7918
  }
7923
7919
 
7924
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7920
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7925
7921
 
7926
7922
  /*
7927
7923
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7961,7 +7957,7 @@
7961
7957
  }
7962
7958
  }
7963
7959
 
7964
- /*! @azure/msal-common v14.14.1 2024-08-13 */
7960
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
7965
7961
 
7966
7962
  /*
7967
7963
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8019,7 +8015,7 @@
8019
8015
  }
8020
8016
  }
8021
8017
 
8022
- /*! @azure/msal-common v14.14.1 2024-08-13 */
8018
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
8023
8019
 
8024
8020
  /*
8025
8021
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8282,7 +8278,7 @@
8282
8278
  }
8283
8279
  }
8284
8280
 
8285
- /*! @azure/msal-common v14.14.1 2024-08-13 */
8281
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
8286
8282
 
8287
8283
  /*
8288
8284
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8361,7 +8357,7 @@
8361
8357
  }
8362
8358
  }
8363
8359
 
8364
- /*! @azure/msal-common v14.14.1 2024-08-13 */
8360
+ /*! @azure/msal-common v14.14.2 2024-08-28 */
8365
8361
 
8366
8362
  /*
8367
8363
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9000,8 +8996,7 @@
9000
8996
  const uninitializedPublicClientApplication = "uninitialized_public_client_application";
9001
8997
  const nativePromptNotSupported = "native_prompt_not_supported";
9002
8998
  const invalidBase64String = "invalid_base64_string";
9003
- const invalidPopTokenRequest = "invalid_pop_token_request";
9004
- const failedToRetry = "failed_to_retry";
8999
+ const invalidPopTokenRequest = "invalid_pop_token_request";
9005
9000
 
9006
9001
  var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
9007
9002
  __proto__: null,
@@ -9017,7 +9012,6 @@
9017
9012
  emptyNavigateUri: emptyNavigateUri,
9018
9013
  emptyWindowError: emptyWindowError,
9019
9014
  failedToParseResponse: failedToParseResponse,
9020
- failedToRetry: failedToRetry,
9021
9015
  getRequestFailed: getRequestFailed,
9022
9016
  hashDoesNotContainKnownProperties: hashDoesNotContainKnownProperties,
9023
9017
  hashEmptyError: hashEmptyError,
@@ -9109,7 +9103,6 @@
9109
9103
  [nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
9110
9104
  [invalidBase64String]: "Invalid base64 encoded string.",
9111
9105
  [invalidPopTokenRequest]: "Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
9112
- [failedToRetry]: "Unable to retry failed auth code redemption due to usage of the onRedirectNavigate request parameter. Please set onRedirectNavigate on the PublicClientApplication configuration instead or call loginRedirect again.",
9113
9106
  };
9114
9107
  /**
9115
9108
  * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
@@ -9398,8 +9391,6 @@
9398
9391
  CORRELATION_ID: "request.correlationId",
9399
9392
  NATIVE_REQUEST: "request.native",
9400
9393
  REDIRECT_CONTEXT: "request.redirect.context",
9401
- REDIRECT_REQUEST: "request.redirect",
9402
- REQUEST_RETRY: "request.retry",
9403
9394
  };
9404
9395
  const StaticCacheKeys = {
9405
9396
  ACCOUNT_KEYS: "msal.account.keys",
@@ -10237,7 +10228,7 @@
10237
10228
 
10238
10229
  /* eslint-disable header/header */
10239
10230
  const name = "@azure/msal-browser";
10240
- const version = "3.21.0";
10231
+ const version = "3.22.0";
10241
10232
 
10242
10233
  /*
10243
10234
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10349,169 +10340,6 @@
10349
10340
  NestedAppAuthUnavailable: "NESTED_APP_AUTH_UNAVAILABLE", // NAA is unavailable in the current context, can retry with standard browser based auth
10350
10341
  };
10351
10342
 
10352
- /*
10353
- * Copyright (c) Microsoft Corporation. All rights reserved.
10354
- * Licensed under the MIT License.
10355
- */
10356
- /**
10357
- * Returns browser performance measurement module if session flag is enabled. Returns undefined otherwise.
10358
- */
10359
- function getPerfMeasurementModule() {
10360
- let sessionStorage;
10361
- try {
10362
- sessionStorage = window[BrowserCacheLocation.SessionStorage];
10363
- const perfEnabled = sessionStorage?.getItem(BROWSER_PERF_ENABLED_KEY);
10364
- if (Number(perfEnabled) === 1) {
10365
- return Promise.resolve().then(function () { return BrowserPerformanceMeasurement$1; });
10366
- }
10367
- // Mute errors if it's a non-browser environment or cookies are blocked.
10368
- }
10369
- catch (e) { }
10370
- return undefined;
10371
- }
10372
- /**
10373
- * Returns boolean, indicating whether browser supports window.performance.now() function.
10374
- */
10375
- function supportsBrowserPerformanceNow() {
10376
- return (typeof window !== "undefined" &&
10377
- typeof window.performance !== "undefined" &&
10378
- typeof window.performance.now === "function");
10379
- }
10380
- /**
10381
- * Returns event duration in milliseconds using window performance API if available. Returns undefined otherwise.
10382
- * @param startTime {DOMHighResTimeStamp | undefined}
10383
- * @returns {number | undefined}
10384
- */
10385
- function getPerfDurationMs(startTime) {
10386
- if (!startTime || !supportsBrowserPerformanceNow()) {
10387
- return undefined;
10388
- }
10389
- return Math.round(window.performance.now() - startTime);
10390
- }
10391
- class BrowserPerformanceClient extends PerformanceClient {
10392
- constructor(configuration, intFields, abbreviations) {
10393
- super(configuration.auth.clientId, configuration.auth.authority || `${Constants.DEFAULT_AUTHORITY}`, new Logger(configuration.system?.loggerOptions || {}, name, version), name, version, configuration.telemetry?.application || {
10394
- appName: "",
10395
- appVersion: "",
10396
- }, intFields, abbreviations);
10397
- }
10398
- generateId() {
10399
- return createNewGuid();
10400
- }
10401
- getPageVisibility() {
10402
- return document.visibilityState?.toString() || null;
10403
- }
10404
- deleteIncompleteSubMeasurements(inProgressEvent) {
10405
- void getPerfMeasurementModule()?.then((module) => {
10406
- const rootEvent = this.eventsByCorrelationId.get(inProgressEvent.event.correlationId);
10407
- const isRootEvent = rootEvent &&
10408
- rootEvent.eventId === inProgressEvent.event.eventId;
10409
- const incompleteMeasurements = [];
10410
- if (isRootEvent && rootEvent?.incompleteSubMeasurements) {
10411
- rootEvent.incompleteSubMeasurements.forEach((subMeasurement) => {
10412
- incompleteMeasurements.push({ ...subMeasurement });
10413
- });
10414
- }
10415
- // Clean up remaining marks for incomplete sub-measurements
10416
- module.BrowserPerformanceMeasurement.flushMeasurements(inProgressEvent.event.correlationId, incompleteMeasurements);
10417
- });
10418
- }
10419
- /**
10420
- * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.
10421
- * Also captures browser page visibilityState.
10422
- *
10423
- * @param {PerformanceEvents} measureName
10424
- * @param {?string} [correlationId]
10425
- * @returns {((event?: Partial<PerformanceEvent>) => PerformanceEvent| null)}
10426
- */
10427
- startMeasurement(measureName, correlationId) {
10428
- // Capture page visibilityState and then invoke start/end measurement
10429
- const startPageVisibility = this.getPageVisibility();
10430
- const inProgressEvent = super.startMeasurement(measureName, correlationId);
10431
- const startTime = supportsBrowserPerformanceNow()
10432
- ? window.performance.now()
10433
- : undefined;
10434
- const browserMeasurement = getPerfMeasurementModule()?.then((module) => {
10435
- return new module.BrowserPerformanceMeasurement(measureName, inProgressEvent.event.correlationId);
10436
- });
10437
- void browserMeasurement?.then((measurement) => measurement.startMeasurement());
10438
- return {
10439
- ...inProgressEvent,
10440
- end: (event, error) => {
10441
- const res = inProgressEvent.end({
10442
- ...event,
10443
- startPageVisibility,
10444
- endPageVisibility: this.getPageVisibility(),
10445
- durationMs: getPerfDurationMs(startTime),
10446
- }, error);
10447
- void browserMeasurement?.then((measurement) => measurement.endMeasurement());
10448
- this.deleteIncompleteSubMeasurements(inProgressEvent);
10449
- return res;
10450
- },
10451
- discard: () => {
10452
- inProgressEvent.discard();
10453
- void browserMeasurement?.then((measurement) => measurement.flushMeasurement());
10454
- this.deleteIncompleteSubMeasurements(inProgressEvent);
10455
- },
10456
- };
10457
- }
10458
- /**
10459
- * Adds pre-queue time to preQueueTimeByCorrelationId map.
10460
- * @param {PerformanceEvents} eventName
10461
- * @param {?string} correlationId
10462
- * @returns
10463
- */
10464
- setPreQueueTime(eventName, correlationId) {
10465
- if (!supportsBrowserPerformanceNow()) {
10466
- this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${eventName}`);
10467
- return;
10468
- }
10469
- if (!correlationId) {
10470
- this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to set telemetry queue time`);
10471
- return;
10472
- }
10473
- const preQueueEvent = this.preQueueTimeByCorrelationId.get(correlationId);
10474
- /**
10475
- * Manually complete queue measurement if there is an incomplete pre-queue event.
10476
- * Incomplete pre-queue events are instrumentation bugs that should be fixed.
10477
- */
10478
- if (preQueueEvent) {
10479
- this.logger.trace(`BrowserPerformanceClient: Incomplete pre-queue ${preQueueEvent.name} found`, correlationId);
10480
- this.addQueueMeasurement(preQueueEvent.name, correlationId, undefined, true);
10481
- }
10482
- this.preQueueTimeByCorrelationId.set(correlationId, {
10483
- name: eventName,
10484
- time: window.performance.now(),
10485
- });
10486
- }
10487
- /**
10488
- * Calculates and adds queue time measurement for given performance event.
10489
- *
10490
- * @param {PerformanceEvents} eventName
10491
- * @param {?string} correlationId
10492
- * @param {?number} queueTime
10493
- * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements
10494
- * @returns
10495
- */
10496
- addQueueMeasurement(eventName, correlationId, queueTime, manuallyCompleted) {
10497
- if (!supportsBrowserPerformanceNow()) {
10498
- this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${eventName}`);
10499
- return;
10500
- }
10501
- if (!correlationId) {
10502
- this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to add queue measurement`);
10503
- return;
10504
- }
10505
- const preQueueTime = super.getPreQueueTime(eventName, correlationId);
10506
- if (!preQueueTime) {
10507
- return;
10508
- }
10509
- const currentTime = window.performance.now();
10510
- const resQueueTime = queueTime || super.calculateQueuedTime(preQueueTime, currentTime);
10511
- return super.addQueueMeasurement(eventName, correlationId, resQueueTime, manuallyCompleted);
10512
- }
10513
- }
10514
-
10515
10343
  /*
10516
10344
  * Copyright (c) Microsoft Corporation. All rights reserved.
10517
10345
  * Licensed under the MIT License.
@@ -10555,9 +10383,7 @@
10555
10383
  messageType: "NestedAppAuthRequest",
10556
10384
  method: "GetInitContext",
10557
10385
  requestId: createNewGuid(),
10558
- sendTime: supportsBrowserPerformanceNow()
10559
- ? window.performance.now()
10560
- : Date.now(),
10386
+ sendTime: Date.now(),
10561
10387
  };
10562
10388
  const request = {
10563
10389
  requestId: message.requestId,
@@ -10616,9 +10442,7 @@
10616
10442
  messageType: "NestedAppAuthRequest",
10617
10443
  method: method,
10618
10444
  requestId: createNewGuid(),
10619
- sendTime: supportsBrowserPerformanceNow()
10620
- ? window.performance.now()
10621
- : Date.now(),
10445
+ sendTime: Date.now(),
10622
10446
  ...requestParams,
10623
10447
  };
10624
10448
  const promise = new Promise((resolve, reject) => {
@@ -12462,7 +12286,6 @@
12462
12286
  this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.CORRELATION_ID));
12463
12287
  this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.CCS_CREDENTIAL));
12464
12288
  this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
12465
- this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.REDIRECT_REQUEST));
12466
12289
  this.setInteractionInProgress(false);
12467
12290
  }
12468
12291
  /**
@@ -12509,75 +12332,6 @@
12509
12332
  this.clearMsalCookies();
12510
12333
  this.setInteractionInProgress(false);
12511
12334
  }
12512
- /**
12513
- * Create request retry key to cache retry status
12514
- */
12515
- generateRequestRetriedKey() {
12516
- return `${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.REQUEST_RETRY}.${this.clientId}`;
12517
- }
12518
- /**
12519
- * Gets the request retry value from the cache
12520
- */
12521
- getRequestRetried() {
12522
- const requestRetriedKey = this.generateRequestRetriedKey();
12523
- const cachedRetryNumber = this.getTemporaryCache(requestRetriedKey);
12524
- if (!cachedRetryNumber) {
12525
- return null;
12526
- }
12527
- return parseInt(cachedRetryNumber);
12528
- }
12529
- /**
12530
- * Sets the request retry value to "retried" in the cache
12531
- */
12532
- setRequestRetried() {
12533
- this.logger.trace("BrowserCacheManager.setRequestRetried called");
12534
- const requestRetriedKey = this.generateRequestRetriedKey();
12535
- this.setTemporaryCache(requestRetriedKey, "1", false);
12536
- }
12537
- /**
12538
- * Removes all request retry values in the cache
12539
- */
12540
- removeRequestRetried() {
12541
- const requestRetriedKey = this.generateRequestRetriedKey();
12542
- this.removeTemporaryItem(requestRetriedKey);
12543
- }
12544
- /**
12545
- * Caches the redirectRequest in the cache
12546
- * @param redirectRequest
12547
- */
12548
- cacheRedirectRequest(redirectRequest) {
12549
- this.logger.trace("BrowserCacheManager.cacheRedirectRequest called");
12550
- const { ...restParams } = redirectRequest;
12551
- delete restParams.onRedirectNavigate;
12552
- const encodedValue = JSON.stringify(restParams);
12553
- this.setTemporaryCache(TemporaryCacheKeys.REDIRECT_REQUEST, encodedValue, true);
12554
- }
12555
- /**
12556
- * Gets redirect request from the cache. Logs an error and returns undefined if nothing is found.
12557
- */
12558
- getCachedRedirectRequest() {
12559
- this.logger.trace("BrowserCacheManager.getCachedRedirectRequest called");
12560
- const cachedRedirectRequest = this.getTemporaryCache(TemporaryCacheKeys.REDIRECT_REQUEST, true);
12561
- if (!cachedRedirectRequest) {
12562
- this.logger.error(`No cached redirect request found.`);
12563
- }
12564
- else {
12565
- this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.REDIRECT_REQUEST));
12566
- let parsedRequest;
12567
- try {
12568
- parsedRequest = JSON.parse(cachedRedirectRequest);
12569
- }
12570
- catch (e) {
12571
- this.logger.errorPii(`Attempted to parse: ${cachedRedirectRequest}`);
12572
- this.logger.error(`Parsing cached redirect request threw with error: ${e}`);
12573
- return;
12574
- }
12575
- if (parsedRequest) {
12576
- return parsedRequest;
12577
- }
12578
- }
12579
- return;
12580
- }
12581
12335
  cacheCodeRequest(authCodeRequest) {
12582
12336
  this.logger.trace("BrowserCacheManager.cacheCodeRequest called");
12583
12337
  const encodedValue = base64Encode(JSON.stringify(authCodeRequest));
@@ -14681,7 +14435,7 @@
14681
14435
  }
14682
14436
  }
14683
14437
  /**
14684
- * Helper which initializes authorization clients and requests
14438
+ * Helper which obtains an access_token for your API via opening a popup window in the user's browser
14685
14439
  * @param validRequest
14686
14440
  * @param popupName
14687
14441
  * @param popup
@@ -14694,13 +14448,61 @@
14694
14448
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenPopup);
14695
14449
  const validRequest = await invokeAsync(this.initializeAuthorizationRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest, this.logger, this.performanceClient, this.correlationId)(request, exports.InteractionType.Popup);
14696
14450
  preconnect(validRequest.authority);
14697
- let authClient;
14698
14451
  try {
14699
14452
  // Create auth code request and generate PKCE params
14700
14453
  const authCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14701
14454
  // Initialize the client
14702
- authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14703
- return await invokeAsync(this.acquireTokenPopupAsyncHelper.bind(this), PerformanceEvents.PopupClientTokenHelper, this.logger, this.performanceClient, this.correlationId)(authClient, authCodeRequest, validRequest, request, popupName, popupWindowAttributes, popup);
14455
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14456
+ const isNativeBroker = NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeMessageHandler, request.authenticationScheme);
14457
+ // Start measurement for server calls with native brokering enabled
14458
+ let fetchNativeAccountIdMeasurement;
14459
+ if (isNativeBroker) {
14460
+ fetchNativeAccountIdMeasurement =
14461
+ this.performanceClient.startMeasurement(PerformanceEvents.FetchAccountIdWithNativeBroker, request.correlationId);
14462
+ }
14463
+ // Create acquire token url.
14464
+ const navigateUrl = await authClient.getAuthCodeUrl({
14465
+ ...validRequest,
14466
+ nativeBroker: isNativeBroker,
14467
+ });
14468
+ // Create popup interaction handler.
14469
+ const interactionHandler = new InteractionHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.performanceClient);
14470
+ // Show the UI once the url has been created. Get the window handle for the popup.
14471
+ const popupParameters = {
14472
+ popup,
14473
+ popupName,
14474
+ popupWindowAttributes,
14475
+ };
14476
+ const popupWindow = this.initiateAuthRequest(navigateUrl, popupParameters);
14477
+ this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
14478
+ // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
14479
+ const responseString = await this.monitorPopupForHash(popupWindow);
14480
+ const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
14481
+ // Remove throttle if it exists
14482
+ ThrottlingUtils.removeThrottle(this.browserStorage, this.config.auth.clientId, authCodeRequest);
14483
+ if (serverParams.accountId) {
14484
+ this.logger.verbose("Account id found in hash, calling WAM for token");
14485
+ // end measurement for server call with native brokering enabled
14486
+ if (fetchNativeAccountIdMeasurement) {
14487
+ fetchNativeAccountIdMeasurement.end({
14488
+ success: true,
14489
+ isNativeBroker: true,
14490
+ });
14491
+ }
14492
+ if (!this.nativeMessageHandler) {
14493
+ throw createBrowserAuthError(nativeConnectionNotEstablished);
14494
+ }
14495
+ const nativeInteractionClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, serverParams.accountId, this.nativeStorage, validRequest.correlationId);
14496
+ const { userRequestState } = ProtocolUtils.parseRequestState(this.browserCrypto, validRequest.state);
14497
+ return await nativeInteractionClient.acquireToken({
14498
+ ...validRequest,
14499
+ state: userRequestState,
14500
+ prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
14501
+ });
14502
+ }
14503
+ // Handle response from hash string.
14504
+ const result = await interactionHandler.handleCodeResponse(serverParams, validRequest);
14505
+ return result;
14704
14506
  }
14705
14507
  catch (e) {
14706
14508
  if (popup) {
@@ -14711,82 +14513,8 @@
14711
14513
  e.setCorrelationId(this.correlationId);
14712
14514
  serverTelemetryManager.cacheFailedRequest(e);
14713
14515
  }
14714
- if (!authClient ||
14715
- !(e instanceof ServerError) ||
14716
- e.errorCode !== BrowserConstants.INVALID_GRANT_ERROR) {
14717
- throw e;
14718
- }
14719
- this.performanceClient.addFields({
14720
- retryError: e.errorCode,
14721
- }, this.correlationId);
14722
- const retryAuthCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14723
- return await invokeAsync(this.acquireTokenPopupAsyncHelper.bind(this), PerformanceEvents.PopupClientTokenHelper, this.logger, this.performanceClient, this.correlationId)(authClient, retryAuthCodeRequest, validRequest, request, popupName, popupWindowAttributes, popup);
14724
- }
14725
- }
14726
- /**
14727
- * Helper which obtains an access_token for your API via opening a popup window in the user's browser
14728
- * @param authClient
14729
- * @param authCodeRequest
14730
- * @param validRequest
14731
- * @param request
14732
- * @param popupName
14733
- * @param popupWindowAttributes
14734
- * @param popup
14735
- * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
14736
- */
14737
- async acquireTokenPopupAsyncHelper(authClient, authCodeRequest, validRequest, request, popupName, popupWindowAttributes, popup) {
14738
- const correlationId = validRequest.correlationId;
14739
- this.performanceClient.addQueueMeasurement(PerformanceEvents.PopupClientTokenHelper, correlationId);
14740
- const isNativeBroker = NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeMessageHandler, request.authenticationScheme);
14741
- // Start measurement for server calls with native brokering enabled
14742
- let fetchNativeAccountIdMeasurement;
14743
- if (isNativeBroker) {
14744
- fetchNativeAccountIdMeasurement =
14745
- this.performanceClient.startMeasurement(PerformanceEvents.FetchAccountIdWithNativeBroker, request.correlationId);
14746
- }
14747
- // Create acquire token url.
14748
- const navigateUrl = await authClient.getAuthCodeUrl({
14749
- ...validRequest,
14750
- nativeBroker: isNativeBroker,
14751
- });
14752
- // Create popup interaction handler.
14753
- const interactionHandler = new InteractionHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.performanceClient);
14754
- // Show the UI once the url has been created. Get the window handle for the popup.
14755
- const popupParameters = {
14756
- popup,
14757
- popupName,
14758
- popupWindowAttributes,
14759
- };
14760
- const popupWindow = this.initiateAuthRequest(navigateUrl, popupParameters);
14761
- this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
14762
- // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
14763
- const responseString = await this.monitorPopupForHash(popupWindow);
14764
- const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
14765
- // Remove throttle if it exists
14766
- ThrottlingUtils.removeThrottle(this.browserStorage, this.config.auth.clientId, authCodeRequest);
14767
- if (serverParams.accountId) {
14768
- this.logger.verbose("Account id found in hash, calling WAM for token");
14769
- // end measurement for server call with native brokering enabled
14770
- if (fetchNativeAccountIdMeasurement) {
14771
- fetchNativeAccountIdMeasurement.end({
14772
- success: true,
14773
- isNativeBroker: true,
14774
- });
14775
- }
14776
- if (!this.nativeMessageHandler) {
14777
- throw createBrowserAuthError(nativeConnectionNotEstablished);
14778
- }
14779
- const nativeInteractionClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, serverParams.accountId, this.nativeStorage, validRequest.correlationId);
14780
- const { userRequestState } = ProtocolUtils.parseRequestState(this.browserCrypto, validRequest.state);
14781
- return nativeInteractionClient.acquireToken({
14782
- ...validRequest,
14783
- state: userRequestState,
14784
- prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
14785
- });
14516
+ throw e;
14786
14517
  }
14787
- // Handle response from hash string.
14788
- const result = await interactionHandler.handleCodeResponse(serverParams, validRequest);
14789
- return result;
14790
14518
  }
14791
14519
  /**
14792
14520
  *
@@ -15188,7 +14916,6 @@
15188
14916
  // Acquire token with retrieved code.
15189
14917
  const tokenResponse = (await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse));
15190
14918
  this.browserStorage.cleanRequestByState(state);
15191
- this.browserStorage.removeRequestRetried();
15192
14919
  return tokenResponse;
15193
14920
  }
15194
14921
  /**
@@ -15224,12 +14951,6 @@
15224
14951
  * @param request
15225
14952
  */
15226
14953
  async acquireToken(request) {
15227
- if (request.onRedirectNavigate) {
15228
- this.logger.warning("Unable to cache redirect request, onRedirectNavigate request option has been deprecated. Please set onRedirectNavigate on PublicClientApplication config instead.");
15229
- }
15230
- else {
15231
- this.browserStorage.cacheRedirectRequest(request);
15232
- }
15233
14954
  const validRequest = await invokeAsync(this.initializeAuthorizationRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest, this.logger, this.performanceClient, this.correlationId)(request, exports.InteractionType.Redirect);
15234
14955
  this.browserStorage.updateCacheEntries(validRequest.state, validRequest.nonce, validRequest.authority, validRequest.loginHint || "", validRequest.account || null);
15235
14956
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenRedirect);
@@ -15361,33 +15082,8 @@
15361
15082
  e.setCorrelationId(this.correlationId);
15362
15083
  serverTelemetryManager.cacheFailedRequest(e);
15363
15084
  }
15364
- if (e instanceof ServerError &&
15365
- e.errorCode === BrowserConstants.INVALID_GRANT_ERROR) {
15366
- this.performanceClient.addFields({
15367
- retryError: e.errorCode,
15368
- }, this.correlationId);
15369
- const requestRetried = this.browserStorage.getRequestRetried();
15370
- if (requestRetried) {
15371
- this.logger.error("Retried request already detected. Throwing error.");
15372
- this.browserStorage.removeRequestRetried();
15373
- throw e;
15374
- }
15375
- const redirectRequest = this.browserStorage.getCachedRedirectRequest();
15376
- if (!redirectRequest) {
15377
- this.logger.error("Unable to retry. Please retry with redirect request");
15378
- this.browserStorage.setRequestRetried();
15379
- throw createBrowserAuthError(failedToRetry);
15380
- }
15381
- this.browserStorage.setRequestRetried();
15382
- await this.acquireToken(redirectRequest);
15383
- return null;
15384
- }
15385
- this.browserStorage.removeTemporaryItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.REDIRECT_REQUEST));
15386
- this.browserStorage.removeRequestRetried();
15387
- throw e;
15388
- }
15389
- finally {
15390
15085
  this.browserStorage.cleanRequestByInteractionType(exports.InteractionType.Redirect);
15086
+ throw e;
15391
15087
  }
15392
15088
  }
15393
15089
  /**
@@ -15742,7 +15438,7 @@
15742
15438
  serverTelemetryManager.cacheFailedRequest(e);
15743
15439
  }
15744
15440
  if (!authClient ||
15745
- !(e instanceof ServerError) ||
15441
+ !(e instanceof AuthError) ||
15746
15442
  e.errorCode !== BrowserConstants.INVALID_GRANT_ERROR) {
15747
15443
  throw e;
15748
15444
  }
@@ -19397,6 +19093,169 @@
19397
19093
  }
19398
19094
  }
19399
19095
 
19096
+ /*
19097
+ * Copyright (c) Microsoft Corporation. All rights reserved.
19098
+ * Licensed under the MIT License.
19099
+ */
19100
+ /**
19101
+ * Returns browser performance measurement module if session flag is enabled. Returns undefined otherwise.
19102
+ */
19103
+ function getPerfMeasurementModule() {
19104
+ let sessionStorage;
19105
+ try {
19106
+ sessionStorage = window[BrowserCacheLocation.SessionStorage];
19107
+ const perfEnabled = sessionStorage?.getItem(BROWSER_PERF_ENABLED_KEY);
19108
+ if (Number(perfEnabled) === 1) {
19109
+ return Promise.resolve().then(function () { return BrowserPerformanceMeasurement$1; });
19110
+ }
19111
+ // Mute errors if it's a non-browser environment or cookies are blocked.
19112
+ }
19113
+ catch (e) { }
19114
+ return undefined;
19115
+ }
19116
+ /**
19117
+ * Returns boolean, indicating whether browser supports window.performance.now() function.
19118
+ */
19119
+ function supportsBrowserPerformanceNow() {
19120
+ return (typeof window !== "undefined" &&
19121
+ typeof window.performance !== "undefined" &&
19122
+ typeof window.performance.now === "function");
19123
+ }
19124
+ /**
19125
+ * Returns event duration in milliseconds using window performance API if available. Returns undefined otherwise.
19126
+ * @param startTime {DOMHighResTimeStamp | undefined}
19127
+ * @returns {number | undefined}
19128
+ */
19129
+ function getPerfDurationMs(startTime) {
19130
+ if (!startTime || !supportsBrowserPerformanceNow()) {
19131
+ return undefined;
19132
+ }
19133
+ return Math.round(window.performance.now() - startTime);
19134
+ }
19135
+ class BrowserPerformanceClient extends PerformanceClient {
19136
+ constructor(configuration, intFields, abbreviations) {
19137
+ super(configuration.auth.clientId, configuration.auth.authority || `${Constants.DEFAULT_AUTHORITY}`, new Logger(configuration.system?.loggerOptions || {}, name, version), name, version, configuration.telemetry?.application || {
19138
+ appName: "",
19139
+ appVersion: "",
19140
+ }, intFields, abbreviations);
19141
+ }
19142
+ generateId() {
19143
+ return createNewGuid();
19144
+ }
19145
+ getPageVisibility() {
19146
+ return document.visibilityState?.toString() || null;
19147
+ }
19148
+ deleteIncompleteSubMeasurements(inProgressEvent) {
19149
+ void getPerfMeasurementModule()?.then((module) => {
19150
+ const rootEvent = this.eventsByCorrelationId.get(inProgressEvent.event.correlationId);
19151
+ const isRootEvent = rootEvent &&
19152
+ rootEvent.eventId === inProgressEvent.event.eventId;
19153
+ const incompleteMeasurements = [];
19154
+ if (isRootEvent && rootEvent?.incompleteSubMeasurements) {
19155
+ rootEvent.incompleteSubMeasurements.forEach((subMeasurement) => {
19156
+ incompleteMeasurements.push({ ...subMeasurement });
19157
+ });
19158
+ }
19159
+ // Clean up remaining marks for incomplete sub-measurements
19160
+ module.BrowserPerformanceMeasurement.flushMeasurements(inProgressEvent.event.correlationId, incompleteMeasurements);
19161
+ });
19162
+ }
19163
+ /**
19164
+ * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.
19165
+ * Also captures browser page visibilityState.
19166
+ *
19167
+ * @param {PerformanceEvents} measureName
19168
+ * @param {?string} [correlationId]
19169
+ * @returns {((event?: Partial<PerformanceEvent>) => PerformanceEvent| null)}
19170
+ */
19171
+ startMeasurement(measureName, correlationId) {
19172
+ // Capture page visibilityState and then invoke start/end measurement
19173
+ const startPageVisibility = this.getPageVisibility();
19174
+ const inProgressEvent = super.startMeasurement(measureName, correlationId);
19175
+ const startTime = supportsBrowserPerformanceNow()
19176
+ ? window.performance.now()
19177
+ : undefined;
19178
+ const browserMeasurement = getPerfMeasurementModule()?.then((module) => {
19179
+ return new module.BrowserPerformanceMeasurement(measureName, inProgressEvent.event.correlationId);
19180
+ });
19181
+ void browserMeasurement?.then((measurement) => measurement.startMeasurement());
19182
+ return {
19183
+ ...inProgressEvent,
19184
+ end: (event, error) => {
19185
+ const res = inProgressEvent.end({
19186
+ ...event,
19187
+ startPageVisibility,
19188
+ endPageVisibility: this.getPageVisibility(),
19189
+ durationMs: getPerfDurationMs(startTime),
19190
+ }, error);
19191
+ void browserMeasurement?.then((measurement) => measurement.endMeasurement());
19192
+ this.deleteIncompleteSubMeasurements(inProgressEvent);
19193
+ return res;
19194
+ },
19195
+ discard: () => {
19196
+ inProgressEvent.discard();
19197
+ void browserMeasurement?.then((measurement) => measurement.flushMeasurement());
19198
+ this.deleteIncompleteSubMeasurements(inProgressEvent);
19199
+ },
19200
+ };
19201
+ }
19202
+ /**
19203
+ * Adds pre-queue time to preQueueTimeByCorrelationId map.
19204
+ * @param {PerformanceEvents} eventName
19205
+ * @param {?string} correlationId
19206
+ * @returns
19207
+ */
19208
+ setPreQueueTime(eventName, correlationId) {
19209
+ if (!supportsBrowserPerformanceNow()) {
19210
+ this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${eventName}`);
19211
+ return;
19212
+ }
19213
+ if (!correlationId) {
19214
+ this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to set telemetry queue time`);
19215
+ return;
19216
+ }
19217
+ const preQueueEvent = this.preQueueTimeByCorrelationId.get(correlationId);
19218
+ /**
19219
+ * Manually complete queue measurement if there is an incomplete pre-queue event.
19220
+ * Incomplete pre-queue events are instrumentation bugs that should be fixed.
19221
+ */
19222
+ if (preQueueEvent) {
19223
+ this.logger.trace(`BrowserPerformanceClient: Incomplete pre-queue ${preQueueEvent.name} found`, correlationId);
19224
+ this.addQueueMeasurement(preQueueEvent.name, correlationId, undefined, true);
19225
+ }
19226
+ this.preQueueTimeByCorrelationId.set(correlationId, {
19227
+ name: eventName,
19228
+ time: window.performance.now(),
19229
+ });
19230
+ }
19231
+ /**
19232
+ * Calculates and adds queue time measurement for given performance event.
19233
+ *
19234
+ * @param {PerformanceEvents} eventName
19235
+ * @param {?string} correlationId
19236
+ * @param {?number} queueTime
19237
+ * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements
19238
+ * @returns
19239
+ */
19240
+ addQueueMeasurement(eventName, correlationId, queueTime, manuallyCompleted) {
19241
+ if (!supportsBrowserPerformanceNow()) {
19242
+ this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${eventName}`);
19243
+ return;
19244
+ }
19245
+ if (!correlationId) {
19246
+ this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to add queue measurement`);
19247
+ return;
19248
+ }
19249
+ const preQueueTime = super.getPreQueueTime(eventName, correlationId);
19250
+ if (!preQueueTime) {
19251
+ return;
19252
+ }
19253
+ const currentTime = window.performance.now();
19254
+ const resQueueTime = queueTime || super.calculateQueuedTime(preQueueTime, currentTime);
19255
+ return super.addQueueMeasurement(eventName, correlationId, resQueueTime, manuallyCompleted);
19256
+ }
19257
+ }
19258
+
19400
19259
  /*
19401
19260
  * Copyright (c) Microsoft Corporation. All rights reserved.
19402
19261
  * Licensed under the MIT License.