@azure/msal-browser 2.32.1 → 2.32.3

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 (126) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +213 -213
  3. package/dist/_virtual/_tslib.js +1 -1
  4. package/dist/app/ClientApplication.js +1 -1
  5. package/dist/app/ClientApplication.js.map +1 -1
  6. package/dist/app/IPublicClientApplication.js +1 -1
  7. package/dist/app/IPublicClientApplication.js.map +1 -1
  8. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  9. package/dist/app/PublicClientApplication.js +7 -6
  10. package/dist/app/PublicClientApplication.js.map +1 -1
  11. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  12. package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
  13. package/dist/cache/AsyncMemoryStorage.js +1 -1
  14. package/dist/cache/AsyncMemoryStorage.js.map +1 -1
  15. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  16. package/dist/cache/BrowserCacheManager.js +8 -7
  17. package/dist/cache/BrowserCacheManager.js.map +1 -1
  18. package/dist/cache/BrowserStorage.js +1 -1
  19. package/dist/cache/BrowserStorage.js.map +1 -1
  20. package/dist/cache/CryptoKeyStore.js +1 -1
  21. package/dist/cache/CryptoKeyStore.js.map +1 -1
  22. package/dist/cache/DatabaseStorage.js +1 -1
  23. package/dist/cache/DatabaseStorage.js.map +1 -1
  24. package/dist/cache/MemoryStorage.js +1 -1
  25. package/dist/cache/MemoryStorage.js.map +1 -1
  26. package/dist/cache/TokenCache.js +1 -1
  27. package/dist/cache/TokenCache.js.map +1 -1
  28. package/dist/config/Configuration.d.ts.map +1 -1
  29. package/dist/config/Configuration.js +6 -3
  30. package/dist/config/Configuration.js.map +1 -1
  31. package/dist/crypto/BrowserCrypto.js +1 -1
  32. package/dist/crypto/BrowserCrypto.js.map +1 -1
  33. package/dist/crypto/CryptoOps.js +1 -1
  34. package/dist/crypto/CryptoOps.js.map +1 -1
  35. package/dist/crypto/GuidGenerator.js +1 -1
  36. package/dist/crypto/GuidGenerator.js.map +1 -1
  37. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  38. package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
  39. package/dist/crypto/MsBrowserCrypto.js +1 -1
  40. package/dist/crypto/MsBrowserCrypto.js.map +1 -1
  41. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  42. package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
  43. package/dist/crypto/PkceGenerator.js +1 -1
  44. package/dist/crypto/PkceGenerator.js.map +1 -1
  45. package/dist/crypto/SignedHttpRequest.js +1 -1
  46. package/dist/crypto/SignedHttpRequest.js.map +1 -1
  47. package/dist/encode/Base64Decode.js +1 -1
  48. package/dist/encode/Base64Decode.js.map +1 -1
  49. package/dist/encode/Base64Encode.js +1 -1
  50. package/dist/encode/Base64Encode.js.map +1 -1
  51. package/dist/error/BrowserAuthError.js +1 -1
  52. package/dist/error/BrowserAuthError.js.map +1 -1
  53. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  54. package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
  55. package/dist/error/NativeAuthError.js +1 -1
  56. package/dist/error/NativeAuthError.js.map +1 -1
  57. package/dist/event/EventHandler.js +1 -1
  58. package/dist/event/EventHandler.js.map +1 -1
  59. package/dist/event/EventMessage.js +1 -1
  60. package/dist/event/EventMessage.js.map +1 -1
  61. package/dist/event/EventType.js +1 -1
  62. package/dist/event/EventType.js.map +1 -1
  63. package/dist/index.cjs.js +195 -145
  64. package/dist/index.cjs.js.map +1 -1
  65. package/dist/index.js +1 -1
  66. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  67. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  68. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  69. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
  70. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  71. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  72. package/dist/interaction_client/PopupClient.js +1 -1
  73. package/dist/interaction_client/PopupClient.js.map +1 -1
  74. package/dist/interaction_client/RedirectClient.js +1 -1
  75. package/dist/interaction_client/RedirectClient.js.map +1 -1
  76. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  77. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  78. package/dist/interaction_client/SilentCacheClient.js +1 -1
  79. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  80. package/dist/interaction_client/SilentIframeClient.js +1 -1
  81. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  82. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  83. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  84. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  85. package/dist/interaction_client/StandardInteractionClient.js +12 -10
  86. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  87. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  88. package/dist/interaction_handler/InteractionHandler.js +1 -1
  89. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  90. package/dist/interaction_handler/RedirectHandler.js +1 -1
  91. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  92. package/dist/interaction_handler/SilentHandler.js +1 -1
  93. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  94. package/dist/internals.d.ts +2 -0
  95. package/dist/internals.d.ts.map +1 -1
  96. package/dist/internals.js +3 -1
  97. package/dist/internals.js.map +1 -1
  98. package/dist/navigation/NavigationClient.js +1 -1
  99. package/dist/navigation/NavigationClient.js.map +1 -1
  100. package/dist/network/FetchClient.js +1 -1
  101. package/dist/network/FetchClient.js.map +1 -1
  102. package/dist/network/XhrClient.js +1 -1
  103. package/dist/network/XhrClient.js.map +1 -1
  104. package/dist/packageMetadata.d.ts +1 -1
  105. package/dist/packageMetadata.js +2 -2
  106. package/dist/packageMetadata.js.map +1 -1
  107. package/dist/telemetry/BrowserPerformanceClient.d.ts +1 -1
  108. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  109. package/dist/telemetry/BrowserPerformanceClient.js +2 -2
  110. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  111. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  112. package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
  113. package/dist/utils/BrowserConstants.js +1 -1
  114. package/dist/utils/BrowserConstants.js.map +1 -1
  115. package/dist/utils/BrowserProtocolUtils.js +1 -1
  116. package/dist/utils/BrowserProtocolUtils.js.map +1 -1
  117. package/dist/utils/BrowserStringUtils.js +1 -1
  118. package/dist/utils/BrowserStringUtils.js.map +1 -1
  119. package/dist/utils/BrowserUtils.js +1 -1
  120. package/dist/utils/BrowserUtils.js.map +1 -1
  121. package/dist/utils/MathUtils.js +1 -1
  122. package/dist/utils/MathUtils.js.map +1 -1
  123. package/lib/msal-browser.js +195 -145
  124. package/lib/msal-browser.js.map +1 -1
  125. package/lib/msal-browser.min.js +33 -33
  126. package/package.json +95 -95
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
1
+ /*! @azure/msal-browser v2.32.3 2023-03-10 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -119,7 +119,7 @@
119
119
  return ar;
120
120
  }
121
121
 
122
- /*! @azure/msal-common v9.0.1 2022-12-07 */
122
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
123
123
  /*! *****************************************************************************
124
124
  Copyright (c) Microsoft Corporation.
125
125
 
@@ -206,7 +206,7 @@
206
206
  return r;
207
207
  }
208
208
 
209
- /*! @azure/msal-common v9.0.1 2022-12-07 */
209
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
210
210
 
211
211
  /*
212
212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -282,6 +282,7 @@
282
282
  HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
283
283
  HeaderNames["AuthenticationInfo"] = "Authentication-Info";
284
284
  HeaderNames["X_MS_REQUEST_ID"] = "x-ms-request-id";
285
+ HeaderNames["X_MS_HTTP_VERSION"] = "x-ms-httpver";
285
286
  })(HeaderNames || (HeaderNames = {}));
286
287
  /**
287
288
  * Persistent cache keys MSAL which stay while user is logged in.
@@ -587,9 +588,10 @@
587
588
  (function (JsonTypes) {
588
589
  JsonTypes["Jwt"] = "JWT";
589
590
  JsonTypes["Jwk"] = "JWK";
591
+ JsonTypes["Pop"] = "pop";
590
592
  })(JsonTypes || (JsonTypes = {}));
591
593
 
592
- /*! @azure/msal-common v9.0.1 2022-12-07 */
594
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
593
595
 
594
596
  /*
595
597
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -645,7 +647,7 @@
645
647
  return AuthError;
646
648
  }(Error));
647
649
 
648
- /*! @azure/msal-common v9.0.1 2022-12-07 */
650
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
649
651
 
650
652
  /*
651
653
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -720,7 +722,7 @@
720
722
  }
721
723
  };
722
724
 
723
- /*! @azure/msal-common v9.0.1 2022-12-07 */
725
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
724
726
 
725
727
  /*
726
728
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1215,7 +1217,7 @@
1215
1217
  return ClientAuthError;
1216
1218
  }(AuthError));
1217
1219
 
1218
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1220
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1219
1221
 
1220
1222
  /*
1221
1223
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1340,7 +1342,7 @@
1340
1342
  return StringUtils;
1341
1343
  }());
1342
1344
 
1343
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1345
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1344
1346
 
1345
1347
  /*
1346
1348
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1367,13 +1369,23 @@
1367
1369
  var defaultLoggerCallback = function () {
1368
1370
  return;
1369
1371
  };
1370
- this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;
1371
- this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;
1372
- this.level = typeof (loggerOptions.logLevel) === "number" ? loggerOptions.logLevel : exports.LogLevel.Info;
1373
- this.correlationId = loggerOptions.correlationId || Constants.EMPTY_STRING;
1372
+ var setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();
1373
+ this.localCallback = setLoggerOptions.loggerCallback || defaultLoggerCallback;
1374
+ this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;
1375
+ this.level = typeof (setLoggerOptions.logLevel) === "number" ? setLoggerOptions.logLevel : exports.LogLevel.Info;
1376
+ this.correlationId = setLoggerOptions.correlationId || Constants.EMPTY_STRING;
1374
1377
  this.packageName = packageName || Constants.EMPTY_STRING;
1375
1378
  this.packageVersion = packageVersion || Constants.EMPTY_STRING;
1376
1379
  }
1380
+ Logger.createDefaultLoggerOptions = function () {
1381
+ return {
1382
+ loggerCallback: function () {
1383
+ // allow users to not set loggerCallback
1384
+ },
1385
+ piiLoggingEnabled: false,
1386
+ logLevel: exports.LogLevel.Info
1387
+ };
1388
+ };
1377
1389
  /**
1378
1390
  * Create new Logger with existing configurations.
1379
1391
  */
@@ -1520,12 +1532,12 @@
1520
1532
  return Logger;
1521
1533
  }());
1522
1534
 
1523
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1535
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1524
1536
  /* eslint-disable header/header */
1525
1537
  var name$1 = "@azure/msal-common";
1526
- var version$1 = "9.0.1";
1538
+ var version$1 = "9.0.3";
1527
1539
 
1528
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1540
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1529
1541
  /*
1530
1542
  * Copyright (c) Microsoft Corporation. All rights reserved.
1531
1543
  * Licensed under the MIT License.
@@ -1546,7 +1558,7 @@
1546
1558
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1547
1559
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1548
1560
 
1549
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1561
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1550
1562
 
1551
1563
  /*
1552
1564
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1623,19 +1635,16 @@
1623
1635
  * @param key
1624
1636
  */
1625
1637
  CredentialEntity.getCredentialType = function (key) {
1626
- // First keyword search will match all "AccessToken" and "AccessToken_With_AuthScheme" credentials
1627
- if (key.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) !== -1) {
1628
- // Perform second search to differentiate between "AccessToken" and "AccessToken_With_AuthScheme" credential types
1629
- if (key.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) !== -1) {
1630
- return CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
1638
+ var separator = Separators.CACHE_KEY_SEPARATOR;
1639
+ // Match host names like "login.microsoftonline.com", "https://accounts.google.com:4000", etc.
1640
+ var domainRe = "(https?:\\/\\/)?([\\w-]+\\.)*([\\w-]{1,63})(\\.(\\w{2,3}))(\\:[0-9]{4,5})?";
1641
+ for (var _i = 0, _a = Object.keys(CredentialType); _i < _a.length; _i++) {
1642
+ var credKey = _a[_i];
1643
+ var credVal = CredentialType[credKey].toLowerCase();
1644
+ // Verify credential type is preceded by a valid host name (environment)
1645
+ if (key.toLowerCase().search("(?<=" + separator + domainRe + ")" + separator + credVal + separator) !== -1) {
1646
+ return CredentialType[credKey];
1631
1647
  }
1632
- return CredentialType.ACCESS_TOKEN;
1633
- }
1634
- else if (key.indexOf(CredentialType.ID_TOKEN.toLowerCase()) !== -1) {
1635
- return CredentialType.ID_TOKEN;
1636
- }
1637
- else if (key.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) !== -1) {
1638
- return CredentialType.REFRESH_TOKEN;
1639
1648
  }
1640
1649
  return Constants.NOT_DEFINED;
1641
1650
  };
@@ -1705,7 +1714,7 @@
1705
1714
  return CredentialEntity;
1706
1715
  }());
1707
1716
 
1708
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1717
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1709
1718
 
1710
1719
  /*
1711
1720
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1960,7 +1969,7 @@
1960
1969
  return ClientConfigurationError;
1961
1970
  }(ClientAuthError));
1962
1971
 
1963
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1972
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
1964
1973
 
1965
1974
  /*
1966
1975
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2144,7 +2153,7 @@
2144
2153
  return ScopeSet;
2145
2154
  }());
2146
2155
 
2147
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2156
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2148
2157
 
2149
2158
  /*
2150
2159
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2182,7 +2191,7 @@
2182
2191
  };
2183
2192
  }
2184
2193
 
2185
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2194
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2186
2195
  /*
2187
2196
  * Copyright (c) Microsoft Corporation. All rights reserved.
2188
2197
  * Licensed under the MIT License.
@@ -2197,7 +2206,7 @@
2197
2206
  AuthorityType[AuthorityType["Dsts"] = 2] = "Dsts";
2198
2207
  })(AuthorityType || (AuthorityType = {}));
2199
2208
 
2200
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2209
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2201
2210
 
2202
2211
  /*
2203
2212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2436,7 +2445,7 @@
2436
2445
  return AccountEntity;
2437
2446
  }());
2438
2447
 
2439
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2448
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2440
2449
 
2441
2450
  /*
2442
2451
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2488,7 +2497,7 @@
2488
2497
  return AuthToken;
2489
2498
  }());
2490
2499
 
2491
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2500
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2492
2501
 
2493
2502
  /*
2494
2503
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3367,7 +3376,7 @@
3367
3376
  return DefaultStorageClass;
3368
3377
  }(CacheManager));
3369
3378
 
3370
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3379
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3371
3380
 
3372
3381
  /*
3373
3382
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3461,7 +3470,7 @@
3461
3470
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3462
3471
  }
3463
3472
 
3464
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3473
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3465
3474
 
3466
3475
  /*
3467
3476
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3481,7 +3490,7 @@
3481
3490
  return ServerError;
3482
3491
  }(AuthError));
3483
3492
 
3484
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3493
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3485
3494
 
3486
3495
  /*
3487
3496
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3577,7 +3586,7 @@
3577
3586
  return ThrottlingUtils;
3578
3587
  }());
3579
3588
 
3580
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3589
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3581
3590
 
3582
3591
  /*
3583
3592
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3626,7 +3635,7 @@
3626
3635
  return NetworkManager;
3627
3636
  }());
3628
3637
 
3629
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3638
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3630
3639
  /*
3631
3640
  * Copyright (c) Microsoft Corporation. All rights reserved.
3632
3641
  * Licensed under the MIT License.
@@ -3637,7 +3646,7 @@
3637
3646
  CcsCredentialType["UPN"] = "UPN";
3638
3647
  })(CcsCredentialType || (CcsCredentialType = {}));
3639
3648
 
3640
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3649
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3641
3650
 
3642
3651
  /*
3643
3652
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3728,7 +3737,7 @@
3728
3737
  return BaseClient;
3729
3738
  }());
3730
3739
 
3731
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3740
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3732
3741
 
3733
3742
  /*
3734
3743
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3814,7 +3823,7 @@
3814
3823
  return RequestValidator;
3815
3824
  }());
3816
3825
 
3817
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3826
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
3818
3827
 
3819
3828
  /*
3820
3829
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4192,7 +4201,7 @@
4192
4201
  return RequestParameterBuilder;
4193
4202
  }());
4194
4203
 
4195
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4204
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4196
4205
 
4197
4206
  /*
4198
4207
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4256,7 +4265,7 @@
4256
4265
  return IdTokenEntity;
4257
4266
  }(CredentialEntity));
4258
4267
 
4259
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4268
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4260
4269
  /*
4261
4270
  * Copyright (c) Microsoft Corporation. All rights reserved.
4262
4271
  * Licensed under the MIT License.
@@ -4306,7 +4315,7 @@
4306
4315
  return TimeUtils;
4307
4316
  }());
4308
4317
 
4309
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4318
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4310
4319
 
4311
4320
  /*
4312
4321
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4420,7 +4429,7 @@
4420
4429
  return AccessTokenEntity;
4421
4430
  }(CredentialEntity));
4422
4431
 
4423
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4432
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4424
4433
 
4425
4434
  /*
4426
4435
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4487,7 +4496,7 @@
4487
4496
  return RefreshTokenEntity;
4488
4497
  }(CredentialEntity));
4489
4498
 
4490
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4499
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4491
4500
 
4492
4501
  /*
4493
4502
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4562,7 +4571,7 @@
4562
4571
  return InteractionRequiredAuthError;
4563
4572
  }(AuthError));
4564
4573
 
4565
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4574
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4566
4575
  /*
4567
4576
  * Copyright (c) Microsoft Corporation. All rights reserved.
4568
4577
  * Licensed under the MIT License.
@@ -4578,7 +4587,7 @@
4578
4587
  return CacheRecord;
4579
4588
  }());
4580
4589
 
4581
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4590
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4582
4591
 
4583
4592
  /*
4584
4593
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4649,7 +4658,7 @@
4649
4658
  return ProtocolUtils;
4650
4659
  }());
4651
4660
 
4652
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4661
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4653
4662
 
4654
4663
  /*
4655
4664
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4883,7 +4892,7 @@
4883
4892
  return UrlString;
4884
4893
  }());
4885
4894
 
4886
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4895
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4887
4896
 
4888
4897
  /*
4889
4898
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4984,7 +4993,7 @@
4984
4993
  return PopTokenGenerator;
4985
4994
  }());
4986
4995
 
4987
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4996
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
4988
4997
 
4989
4998
  /*
4990
4999
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5054,7 +5063,7 @@
5054
5063
  return AppMetadataEntity;
5055
5064
  }());
5056
5065
 
5057
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5066
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
5058
5067
  /*
5059
5068
  * Copyright (c) Microsoft Corporation. All rights reserved.
5060
5069
  * Licensed under the MIT License.
@@ -5090,7 +5099,7 @@
5090
5099
  return TokenCacheContext;
5091
5100
  }());
5092
5101
 
5093
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5102
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
5094
5103
 
5095
5104
  /*
5096
5105
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5361,7 +5370,7 @@
5361
5370
  cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,
5362
5371
  msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING,
5363
5372
  code: code,
5364
- fromNativeBroker: false
5373
+ fromNativeBroker: false,
5365
5374
  }];
5366
5375
  }
5367
5376
  });
@@ -5370,7 +5379,7 @@
5370
5379
  return ResponseHandler;
5371
5380
  }());
5372
5381
 
5373
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5382
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
5374
5383
 
5375
5384
  /*
5376
5385
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5381,8 +5390,8 @@
5381
5390
  */
5382
5391
  var AuthorizationCodeClient = /** @class */ (function (_super) {
5383
5392
  __extends(AuthorizationCodeClient, _super);
5384
- function AuthorizationCodeClient(configuration) {
5385
- var _this = _super.call(this, configuration) || this;
5393
+ function AuthorizationCodeClient(configuration, performanceClient) {
5394
+ var _this = _super.call(this, configuration, performanceClient) || this;
5386
5395
  // Flag to indicate if client is for hybrid spa auth code redemption
5387
5396
  _this.includeRedirectUri = true;
5388
5397
  return _this;
@@ -5416,26 +5425,47 @@
5416
5425
  * @param request
5417
5426
  */
5418
5427
  AuthorizationCodeClient.prototype.acquireToken = function (request, authCodePayload) {
5419
- var _a;
5428
+ var _a, _b, _c;
5420
5429
  return __awaiter(this, void 0, void 0, function () {
5421
- var reqTimestamp, response, requestId, responseHandler;
5422
- return __generator(this, function (_b) {
5423
- switch (_b.label) {
5430
+ var atsMeasurement, reqTimestamp, response, requestId, httpVerAuthority, responseHandler;
5431
+ var _this = this;
5432
+ return __generator(this, function (_d) {
5433
+ switch (_d.label) {
5424
5434
  case 0:
5425
- this.logger.info("in acquireToken call");
5435
+ atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("AuthCodeClientAcquireToken", request.correlationId);
5436
+ this.logger.info("in acquireToken call in auth-code client");
5426
5437
  if (!request || StringUtils.isEmpty(request.code)) {
5427
5438
  throw ClientAuthError.createTokenRequestCannotBeMadeError();
5428
5439
  }
5429
5440
  reqTimestamp = TimeUtils.nowSeconds();
5430
5441
  return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
5431
5442
  case 1:
5432
- response = _b.sent();
5433
- requestId = (_a = response.headers) === null || _a === void 0 ? void 0 : _a[HeaderNames.X_MS_REQUEST_ID];
5443
+ response = _d.sent();
5444
+ requestId = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_REQUEST_ID];
5445
+ httpVerAuthority = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_HTTP_VERSION];
5446
+ if (httpVerAuthority) {
5447
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5448
+ httpVerAuthority: httpVerAuthority
5449
+ });
5450
+ }
5434
5451
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5435
5452
  // Validate response. This function throws a server error if an error is returned by the server.
5436
5453
  responseHandler.validateTokenResponse(response.body);
5437
- return [4 /*yield*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId)];
5438
- case 2: return [2 /*return*/, _b.sent()];
5454
+ return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId).then(function (result) {
5455
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5456
+ success: true
5457
+ });
5458
+ return result;
5459
+ })
5460
+ .catch(function (error) {
5461
+ _this.logger.verbose("Error in fetching token in ACC", request.correlationId);
5462
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5463
+ errorCode: error.errorCode,
5464
+ subErrorCode: error.subError,
5465
+ success: false
5466
+ });
5467
+ throw error;
5468
+ })];
5439
5469
  }
5440
5470
  });
5441
5471
  });
@@ -5823,7 +5853,7 @@
5823
5853
  return AuthorizationCodeClient;
5824
5854
  }(BaseClient));
5825
5855
 
5826
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5856
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
5827
5857
  /*
5828
5858
  * Copyright (c) Microsoft Corporation. All rights reserved.
5829
5859
  * Licensed under the MIT License.
@@ -5934,6 +5964,11 @@
5934
5964
  * Time taken for acquiring cached refresh token
5935
5965
  */
5936
5966
  PerformanceEvents["RefreshTokenClientAcquireTokenWithCachedRefreshToken"] = "refreshTokenClientAcquireTokenWithCachedRefreshToken";
5967
+ PerformanceEvents["GetEndpointMetadataFromNetwork"] = "getEndpointMetadataFromNetwork";
5968
+ PerformanceEvents["GetCloudDiscoveryMetadataFromNetworkMeasurement"] = "getCloudDiscoveryMetadataFromNetworkMeasurement";
5969
+ PerformanceEvents["HandleRedirectPromiseMeasurement"] = "handleRedirectPromiseMeasurement";
5970
+ PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
5971
+ PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5937
5972
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5938
5973
  /**
5939
5974
  * State of the performance event.
@@ -5948,7 +5983,7 @@
5948
5983
  PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
5949
5984
  })(PerformanceEventStatus || (PerformanceEventStatus = {}));
5950
5985
 
5951
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5986
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
5952
5987
 
5953
5988
  /*
5954
5989
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5963,23 +5998,29 @@
5963
5998
  return _super.call(this, configuration, performanceClient) || this;
5964
5999
  }
5965
6000
  RefreshTokenClient.prototype.acquireToken = function (request) {
5966
- var _a, _b, _c;
6001
+ var _a, _b, _c, _d;
5967
6002
  return __awaiter(this, void 0, void 0, function () {
5968
- var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
6003
+ var atsMeasurement, reqTimestamp, response, httpVerToken, requestId, responseHandler;
5969
6004
  var _this = this;
5970
- return __generator(this, function (_d) {
5971
- switch (_d.label) {
6005
+ return __generator(this, function (_e) {
6006
+ switch (_e.label) {
5972
6007
  case 0:
5973
6008
  atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
5974
6009
  this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
5975
6010
  reqTimestamp = TimeUtils.nowSeconds();
5976
6011
  return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
5977
6012
  case 1:
5978
- response = _d.sent();
6013
+ response = _e.sent();
6014
+ httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_HTTP_VERSION];
5979
6015
  atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5980
- refreshTokenSize: ((_b = response.body.refresh_token) === null || _b === void 0 ? void 0 : _b.length) || 0
6016
+ refreshTokenSize: ((_c = response.body.refresh_token) === null || _c === void 0 ? void 0 : _c.length) || 0,
5981
6017
  });
5982
- requestId = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_REQUEST_ID];
6018
+ if (httpVerToken) {
6019
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6020
+ httpVerToken: httpVerToken,
6021
+ });
6022
+ }
6023
+ requestId = (_d = response.headers) === null || _d === void 0 ? void 0 : _d[HeaderNames.X_MS_REQUEST_ID];
5983
6024
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5984
6025
  responseHandler.validateTokenResponse(response.body);
5985
6026
  return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
@@ -6213,7 +6254,7 @@
6213
6254
  return RefreshTokenClient;
6214
6255
  }(BaseClient));
6215
6256
 
6216
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6257
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6217
6258
 
6218
6259
  /*
6219
6260
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6337,7 +6378,7 @@
6337
6378
  return SilentFlowClient;
6338
6379
  }(BaseClient));
6339
6380
 
6340
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6381
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6341
6382
  /*
6342
6383
  * Copyright (c) Microsoft Corporation. All rights reserved.
6343
6384
  * Licensed under the MIT License.
@@ -6349,7 +6390,7 @@
6349
6390
  response.hasOwnProperty("jwks_uri"));
6350
6391
  }
6351
6392
 
6352
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6393
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6353
6394
  /*
6354
6395
  * Copyright (c) Microsoft Corporation. All rights reserved.
6355
6396
  * Licensed under the MIT License.
@@ -6358,7 +6399,7 @@
6358
6399
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6359
6400
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6360
6401
 
6361
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6402
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6362
6403
  /*
6363
6404
  * Copyright (c) Microsoft Corporation. All rights reserved.
6364
6405
  * Licensed under the MIT License.
@@ -6372,7 +6413,7 @@
6372
6413
  ProtocolMode["OIDC"] = "OIDC";
6373
6414
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6374
6415
 
6375
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6416
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6376
6417
 
6377
6418
  /*
6378
6419
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6449,7 +6490,7 @@
6449
6490
  return AuthorityMetadataEntity;
6450
6491
  }());
6451
6492
 
6452
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6493
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6453
6494
  /*
6454
6495
  * Copyright (c) Microsoft Corporation. All rights reserved.
6455
6496
  * Licensed under the MIT License.
@@ -6459,7 +6500,7 @@
6459
6500
  response.hasOwnProperty("metadata"));
6460
6501
  }
6461
6502
 
6462
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6503
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6463
6504
  /*
6464
6505
  * Copyright (c) Microsoft Corporation. All rights reserved.
6465
6506
  * Licensed under the MIT License.
@@ -6469,7 +6510,7 @@
6469
6510
  response.hasOwnProperty("error_description"));
6470
6511
  }
6471
6512
 
6472
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6513
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6473
6514
 
6474
6515
  /*
6475
6516
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6591,7 +6632,7 @@
6591
6632
  return RegionDiscovery;
6592
6633
  }());
6593
6634
 
6594
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6635
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
6595
6636
 
6596
6637
  /*
6597
6638
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7313,7 +7354,7 @@
7313
7354
  return Authority;
7314
7355
  }());
7315
7356
 
7316
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7357
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7317
7358
 
7318
7359
  /*
7319
7360
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7374,7 +7415,7 @@
7374
7415
  return AuthorityFactory;
7375
7416
  }());
7376
7417
 
7377
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7418
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7378
7419
 
7379
7420
  /*
7380
7421
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7405,7 +7446,7 @@
7405
7446
  return ServerTelemetryEntity;
7406
7447
  }());
7407
7448
 
7408
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7449
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7409
7450
 
7410
7451
  /*
7411
7452
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7433,7 +7474,7 @@
7433
7474
  return ThrottlingEntity;
7434
7475
  }());
7435
7476
 
7436
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7477
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7437
7478
 
7438
7479
  /*
7439
7480
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7450,7 +7491,7 @@
7450
7491
  }
7451
7492
  };
7452
7493
 
7453
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7494
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7454
7495
 
7455
7496
  /*
7456
7497
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7495,7 +7536,7 @@
7495
7536
  return JoseHeaderError;
7496
7537
  }(AuthError));
7497
7538
 
7498
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7539
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7499
7540
 
7500
7541
  /*
7501
7542
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7525,8 +7566,8 @@
7525
7566
  throw JoseHeaderError.createMissingAlgError();
7526
7567
  }
7527
7568
  var shrHeader = new JoseHeader({
7528
- // Access Token PoP headers must have type JWT, but the type header can be overriden for special cases
7529
- typ: shrHeaderOptions.typ || JsonTypes.Jwt,
7569
+ // Access Token PoP headers must have type pop, but the type header can be overriden for special cases
7570
+ typ: shrHeaderOptions.typ || JsonTypes.Pop,
7530
7571
  kid: shrHeaderOptions.kid,
7531
7572
  alg: shrHeaderOptions.alg
7532
7573
  });
@@ -7535,7 +7576,7 @@
7535
7576
  return JoseHeader;
7536
7577
  }());
7537
7578
 
7538
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7579
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7539
7580
 
7540
7581
  /*
7541
7582
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7594,7 +7635,7 @@
7594
7635
  return AuthenticationHeaderParser;
7595
7636
  }());
7596
7637
 
7597
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7638
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7598
7639
 
7599
7640
  /*
7600
7641
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7756,7 +7797,7 @@
7756
7797
  return ServerTelemetryManager;
7757
7798
  }());
7758
7799
 
7759
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7800
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
7760
7801
 
7761
7802
  /*
7762
7803
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7802,7 +7843,7 @@
7802
7843
  this.logger.info("PerformanceClient: No correlation id provided for " + measureName + ", generating", eventCorrelationId);
7803
7844
  }
7804
7845
  this.logger.trace("PerformanceClient: Performance measurement started for " + measureName, eventCorrelationId);
7805
- var performanceMeasurement = this.startPerformanceMeasuremeant(measureName, eventCorrelationId);
7846
+ var performanceMeasurement = this.startPerformanceMeasurement(measureName, eventCorrelationId);
7806
7847
  performanceMeasurement.startMeasurement();
7807
7848
  var inProgressEvent = {
7808
7849
  eventId: this.generateId(),
@@ -8051,7 +8092,7 @@
8051
8092
  return PerformanceClient;
8052
8093
  }());
8053
8094
 
8054
- /*! @azure/msal-common v9.0.1 2022-12-07 */
8095
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
8055
8096
 
8056
8097
  /*
8057
8098
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8077,7 +8118,7 @@
8077
8118
  StubPerformanceClient.prototype.generateId = function () {
8078
8119
  return "callback-id";
8079
8120
  };
8080
- StubPerformanceClient.prototype.startPerformanceMeasuremeant = function () {
8121
+ StubPerformanceClient.prototype.startPerformanceMeasurement = function () {
8081
8122
  return new StubPerformanceMeasurement();
8082
8123
  };
8083
8124
  return StubPerformanceClient;
@@ -9323,17 +9364,17 @@
9323
9364
  var activeAccountValueFilters = this.getItem(activeAccountKeyFilters);
9324
9365
  if (!activeAccountValueFilters) {
9325
9366
  // if new active account cache type isn't found, it's an old version, so look for that instead
9326
- this.logger.trace("No active account filters cache schema found, looking for legacy schema");
9367
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");
9327
9368
  var activeAccountKeyLocal = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);
9328
9369
  var activeAccountValueLocal = this.getItem(activeAccountKeyLocal);
9329
9370
  if (!activeAccountValueLocal) {
9330
- this.logger.trace("No active account found");
9371
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9331
9372
  return null;
9332
9373
  }
9333
9374
  var activeAccount = this.getAccountInfoByFilter({ localAccountId: activeAccountValueLocal })[0] || null;
9334
9375
  if (activeAccount) {
9335
- this.logger.trace("Legacy active account cache schema found");
9336
- this.logger.trace("Adding active account filters cache schema");
9376
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found");
9377
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema");
9337
9378
  this.setActiveAccount(activeAccount);
9338
9379
  return activeAccount;
9339
9380
  }
@@ -9341,13 +9382,13 @@
9341
9382
  }
9342
9383
  var activeAccountValueObj = this.validateAndParseJson(activeAccountValueFilters);
9343
9384
  if (activeAccountValueObj) {
9344
- this.logger.trace("Active account filters schema found");
9385
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found");
9345
9386
  return this.getAccountInfoByFilter({
9346
9387
  homeAccountId: activeAccountValueObj.homeAccountId,
9347
9388
  localAccountId: activeAccountValueObj.localAccountId
9348
9389
  })[0] || null;
9349
9390
  }
9350
- this.logger.trace("No active account found");
9391
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9351
9392
  return null;
9352
9393
  };
9353
9394
  /**
@@ -9378,6 +9419,7 @@
9378
9419
  */
9379
9420
  BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {
9380
9421
  var allAccounts = this.getAllAccounts();
9422
+ this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total " + allAccounts.length + " accounts found");
9381
9423
  return allAccounts.filter(function (accountObj) {
9382
9424
  if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {
9383
9425
  return false;
@@ -9940,7 +9982,7 @@
9940
9982
 
9941
9983
  /* eslint-disable header/header */
9942
9984
  var name = "@azure/msal-browser";
9943
- var version = "2.32.1";
9985
+ var version = "2.32.3";
9944
9986
 
9945
9987
  /*
9946
9988
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10644,7 +10686,7 @@
10644
10686
  */
10645
10687
  StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
10646
10688
  return __awaiter$1(this, void 0, void 0, function () {
10647
- var discoveredAuthority;
10689
+ var discoveredAuthority, logger;
10648
10690
  return __generator$1(this, function (_a) {
10649
10691
  switch (_a.label) {
10650
10692
  case 0:
@@ -10652,6 +10694,7 @@
10652
10694
  return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions)];
10653
10695
  case 1:
10654
10696
  discoveredAuthority = _a.sent();
10697
+ logger = this.config.system.loggerOptions;
10655
10698
  return [2 /*return*/, {
10656
10699
  authOptions: {
10657
10700
  clientId: this.config.auth.clientId,
@@ -10663,9 +10706,9 @@
10663
10706
  preventCorsPreflight: true
10664
10707
  },
10665
10708
  loggerOptions: {
10666
- loggerCallback: this.config.system.loggerOptions.loggerCallback,
10667
- piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,
10668
- logLevel: this.config.system.loggerOptions.logLevel,
10709
+ loggerCallback: logger.loggerCallback,
10710
+ piiLoggingEnabled: logger.piiLoggingEnabled,
10711
+ logLevel: logger.logLevel,
10669
10712
  correlationId: this.correlationId
10670
10713
  },
10671
10714
  cryptoInterface: this.browserCrypto,
@@ -10709,13 +10752,14 @@
10709
10752
  * @param requestCorrelationId
10710
10753
  */
10711
10754
  StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority, requestAzureCloudOptions) {
10755
+ var _a;
10712
10756
  return __awaiter$1(this, void 0, void 0, function () {
10713
10757
  var getAuthorityMeasurement, authorityOptions, userAuthority, builtAuthority;
10714
- return __generator$1(this, function (_a) {
10715
- switch (_a.label) {
10758
+ return __generator$1(this, function (_b) {
10759
+ switch (_b.label) {
10716
10760
  case 0:
10717
10761
  this.logger.verbose("getDiscoveredAuthority called", this.correlationId);
10718
- getAuthorityMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10762
+ getAuthorityMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10719
10763
  authorityOptions = {
10720
10764
  protocolMode: this.config.auth.protocolMode,
10721
10765
  knownAuthorities: this.config.auth.knownAuthorities,
@@ -10729,7 +10773,7 @@
10729
10773
  return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
10730
10774
  .then(function (result) {
10731
10775
  getAuthorityMeasurement.endMeasurement({
10732
- success: true
10776
+ success: true,
10733
10777
  });
10734
10778
  return result;
10735
10779
  })
@@ -10741,7 +10785,7 @@
10741
10785
  });
10742
10786
  throw error;
10743
10787
  })];
10744
- case 1: return [2 /*return*/, _a.sent()];
10788
+ case 1: return [2 /*return*/, _b.sent()];
10745
10789
  }
10746
10790
  });
10747
10791
  });
@@ -12913,7 +12957,9 @@
12913
12957
  // Default logger options for browser
12914
12958
  var DEFAULT_LOGGER_OPTIONS = {
12915
12959
  // eslint-disable-next-line @typescript-eslint/no-empty-function
12916
- loggerCallback: function () { },
12960
+ loggerCallback: function () {
12961
+ // allow users to not set logger call back
12962
+ },
12917
12963
  logLevel: exports.LogLevel.Info,
12918
12964
  piiLoggingEnabled: false
12919
12965
  };
@@ -12924,6 +12970,7 @@
12924
12970
  useMsrCrypto: false,
12925
12971
  entropy: undefined
12926
12972
  } });
12973
+ var providedSystemOptions = __assign$1(__assign$1({}, userInputSystem), { loggerOptions: (userInputSystem === null || userInputSystem === void 0 ? void 0 : userInputSystem.loggerOptions) || DEFAULT_LOGGER_OPTIONS });
12927
12974
  var DEFAULT_TELEMETRY_OPTIONS = {
12928
12975
  application: {
12929
12976
  appName: Constants.EMPTY_STRING,
@@ -12933,7 +12980,7 @@
12933
12980
  var overlayedConfig = {
12934
12981
  auth: __assign$1(__assign$1({}, DEFAULT_AUTH_OPTIONS), userInputAuth),
12935
12982
  cache: __assign$1(__assign$1({}, DEFAULT_CACHE_OPTIONS), userInputCache),
12936
- system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), userInputSystem),
12983
+ system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), providedSystemOptions),
12937
12984
  telemetry: __assign$1(__assign$1({}, DEFAULT_TELEMETRY_OPTIONS), userInputTelemetry)
12938
12985
  };
12939
12986
  return overlayedConfig;
@@ -13424,27 +13471,6 @@
13424
13471
  return EventHandler;
13425
13472
  }());
13426
13473
 
13427
- /*
13428
- * Copyright (c) Microsoft Corporation. All rights reserved.
13429
- * Licensed under the MIT License.
13430
- */
13431
-
13432
- var internals = /*#__PURE__*/Object.freeze({
13433
- __proto__: null,
13434
- BrowserCacheManager: BrowserCacheManager,
13435
- StandardInteractionClient: StandardInteractionClient,
13436
- RedirectClient: RedirectClient,
13437
- PopupClient: PopupClient,
13438
- SilentIframeClient: SilentIframeClient,
13439
- SilentCacheClient: SilentCacheClient,
13440
- SilentRefreshClient: SilentRefreshClient,
13441
- RedirectHandler: RedirectHandler,
13442
- EventHandler: EventHandler,
13443
- NativeMessageHandler: NativeMessageHandler,
13444
- BrowserConstants: BrowserConstants,
13445
- get TemporaryCacheKeys () { return TemporaryCacheKeys; }
13446
- });
13447
-
13448
13474
  /*
13449
13475
  * Copyright (c) Microsoft Corporation. All rights reserved.
13450
13476
  * Licensed under the MIT License.
@@ -14979,6 +15005,29 @@
14979
15005
  return CryptoOps;
14980
15006
  }());
14981
15007
 
15008
+ /*
15009
+ * Copyright (c) Microsoft Corporation. All rights reserved.
15010
+ * Licensed under the MIT License.
15011
+ */
15012
+
15013
+ var internals = /*#__PURE__*/Object.freeze({
15014
+ __proto__: null,
15015
+ BrowserCacheManager: BrowserCacheManager,
15016
+ StandardInteractionClient: StandardInteractionClient,
15017
+ RedirectClient: RedirectClient,
15018
+ PopupClient: PopupClient,
15019
+ SilentIframeClient: SilentIframeClient,
15020
+ SilentCacheClient: SilentCacheClient,
15021
+ SilentRefreshClient: SilentRefreshClient,
15022
+ RedirectHandler: RedirectHandler,
15023
+ EventHandler: EventHandler,
15024
+ NativeMessageHandler: NativeMessageHandler,
15025
+ BrowserConstants: BrowserConstants,
15026
+ get TemporaryCacheKeys () { return TemporaryCacheKeys; },
15027
+ CryptoOps: CryptoOps,
15028
+ NativeAuthError: NativeAuthError
15029
+ });
15030
+
14982
15031
  /*
14983
15032
  * Copyright (c) Microsoft Corporation. All rights reserved.
14984
15033
  * Licensed under the MIT License.
@@ -15358,7 +15407,7 @@
15358
15407
  _this.guidGenerator = new GuidGenerator(_this.browserCrypto);
15359
15408
  return _this;
15360
15409
  }
15361
- BrowserPerformanceClient.prototype.startPerformanceMeasuremeant = function (measureName, correlationId) {
15410
+ BrowserPerformanceClient.prototype.startPerformanceMeasurement = function (measureName, correlationId) {
15362
15411
  return new BrowserPerformanceMeasurement(measureName, correlationId);
15363
15412
  };
15364
15413
  BrowserPerformanceClient.prototype.generateId = function () {
@@ -16463,7 +16512,8 @@
16463
16512
  success: true,
16464
16513
  fromCache: result.fromCache,
16465
16514
  isNativeBroker: result.fromNativeBroker,
16466
- requestId: result.requestId
16515
+ cacheLookupPolicy: request.cacheLookupPolicy,
16516
+ requestId: result.requestId,
16467
16517
  });
16468
16518
  atsMeasurement.flushMeasurement();
16469
16519
  return result;
@@ -16501,13 +16551,13 @@
16501
16551
  */
16502
16552
  PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
16503
16553
  return __awaiter$1(this, void 0, void 0, function () {
16504
- var astsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16554
+ var atsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16505
16555
  var _this = this;
16506
16556
  return __generator$1(this, function (_a) {
16507
16557
  switch (_a.label) {
16508
16558
  case 0:
16509
16559
  this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
16510
- astsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16560
+ atsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16511
16561
  if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
16512
16562
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
16513
16563
  silentRequest = __assign$1(__assign$1({}, request), { account: account });
@@ -16560,7 +16610,7 @@
16560
16610
  _a.label = 3;
16561
16611
  case 3: return [2 /*return*/, result.then(function (response) {
16562
16612
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
16563
- astsAsyncMeasurement.endMeasurement({
16613
+ atsAsyncMeasurement.endMeasurement({
16564
16614
  success: true,
16565
16615
  fromCache: response.fromCache,
16566
16616
  isNativeBroker: response.fromNativeBroker,
@@ -16569,7 +16619,7 @@
16569
16619
  return response;
16570
16620
  }).catch(function (tokenRenewalError) {
16571
16621
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
16572
- astsAsyncMeasurement.endMeasurement({
16622
+ atsAsyncMeasurement.endMeasurement({
16573
16623
  errorCode: tokenRenewalError.errorCode,
16574
16624
  subErrorCode: tokenRenewalError.subError,
16575
16625
  success: false