@azure/msal-browser 2.32.1 → 2.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.js +1 -1
  4. package/dist/app/ClientApplication.js.map +1 -1
  5. package/dist/app/IPublicClientApplication.js +1 -1
  6. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  7. package/dist/app/PublicClientApplication.js +7 -6
  8. package/dist/app/PublicClientApplication.js.map +1 -1
  9. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  10. package/dist/cache/AsyncMemoryStorage.js +1 -1
  11. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  12. package/dist/cache/BrowserCacheManager.js +8 -7
  13. package/dist/cache/BrowserCacheManager.js.map +1 -1
  14. package/dist/cache/BrowserStorage.js +1 -1
  15. package/dist/cache/CryptoKeyStore.js +1 -1
  16. package/dist/cache/DatabaseStorage.js +1 -1
  17. package/dist/cache/MemoryStorage.js +1 -1
  18. package/dist/cache/TokenCache.js +1 -1
  19. package/dist/config/Configuration.d.ts.map +1 -1
  20. package/dist/config/Configuration.js +6 -3
  21. package/dist/config/Configuration.js.map +1 -1
  22. package/dist/crypto/BrowserCrypto.js +1 -1
  23. package/dist/crypto/CryptoOps.js +1 -1
  24. package/dist/crypto/GuidGenerator.js +1 -1
  25. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  26. package/dist/crypto/MsBrowserCrypto.js +1 -1
  27. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  28. package/dist/crypto/PkceGenerator.js +1 -1
  29. package/dist/crypto/SignedHttpRequest.js +1 -1
  30. package/dist/encode/Base64Decode.js +1 -1
  31. package/dist/encode/Base64Encode.js +1 -1
  32. package/dist/error/BrowserAuthError.js +1 -1
  33. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  34. package/dist/error/NativeAuthError.js +1 -1
  35. package/dist/event/EventHandler.js +1 -1
  36. package/dist/event/EventMessage.js +1 -1
  37. package/dist/event/EventType.js +1 -1
  38. package/dist/index.cjs.js +192 -143
  39. package/dist/index.cjs.js.map +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  42. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  43. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  44. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  45. package/dist/interaction_client/PopupClient.js +1 -1
  46. package/dist/interaction_client/RedirectClient.js +1 -1
  47. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  48. package/dist/interaction_client/SilentCacheClient.js +1 -1
  49. package/dist/interaction_client/SilentIframeClient.js +1 -1
  50. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  51. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  52. package/dist/interaction_client/StandardInteractionClient.js +12 -10
  53. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  54. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  55. package/dist/interaction_handler/InteractionHandler.js +1 -1
  56. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  57. package/dist/interaction_handler/RedirectHandler.js +1 -1
  58. package/dist/interaction_handler/SilentHandler.js +1 -1
  59. package/dist/internals.d.ts +2 -0
  60. package/dist/internals.d.ts.map +1 -1
  61. package/dist/internals.js +3 -1
  62. package/dist/internals.js.map +1 -1
  63. package/dist/navigation/NavigationClient.js +1 -1
  64. package/dist/network/FetchClient.js +1 -1
  65. package/dist/network/XhrClient.js +1 -1
  66. package/dist/packageMetadata.d.ts +1 -1
  67. package/dist/packageMetadata.js +2 -2
  68. package/dist/packageMetadata.js.map +1 -1
  69. package/dist/telemetry/BrowserPerformanceClient.d.ts +1 -1
  70. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  71. package/dist/telemetry/BrowserPerformanceClient.js +2 -2
  72. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  73. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  74. package/dist/utils/BrowserConstants.js +1 -1
  75. package/dist/utils/BrowserProtocolUtils.js +1 -1
  76. package/dist/utils/BrowserStringUtils.js +1 -1
  77. package/dist/utils/BrowserUtils.js +1 -1
  78. package/dist/utils/MathUtils.js +1 -1
  79. package/lib/msal-browser.js +192 -143
  80. package/lib/msal-browser.js.map +1 -1
  81. package/lib/msal-browser.min.js +33 -33
  82. package/package.json +2 -2
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
1
+ /*! @azure/msal-browser v2.32.2 2023-01-10 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -117,7 +117,7 @@ function __spread() {
117
117
  return ar;
118
118
  }
119
119
 
120
- /*! @azure/msal-common v9.0.1 2022-12-07 */
120
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
121
121
  /*! *****************************************************************************
122
122
  Copyright (c) Microsoft Corporation.
123
123
 
@@ -204,7 +204,7 @@ function __spreadArrays() {
204
204
  return r;
205
205
  }
206
206
 
207
- /*! @azure/msal-common v9.0.1 2022-12-07 */
207
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
208
208
 
209
209
  /*
210
210
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -280,6 +280,7 @@ var HeaderNames;
280
280
  HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
281
281
  HeaderNames["AuthenticationInfo"] = "Authentication-Info";
282
282
  HeaderNames["X_MS_REQUEST_ID"] = "x-ms-request-id";
283
+ HeaderNames["X_MS_HTTP_VERSION"] = "x-ms-httpver";
283
284
  })(HeaderNames || (HeaderNames = {}));
284
285
  /**
285
286
  * Persistent cache keys MSAL which stay while user is logged in.
@@ -587,7 +588,7 @@ var JsonTypes;
587
588
  JsonTypes["Jwk"] = "JWK";
588
589
  })(JsonTypes || (JsonTypes = {}));
589
590
 
590
- /*! @azure/msal-common v9.0.1 2022-12-07 */
591
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
591
592
 
592
593
  /*
593
594
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -643,7 +644,7 @@ var AuthError = /** @class */ (function (_super) {
643
644
  return AuthError;
644
645
  }(Error));
645
646
 
646
- /*! @azure/msal-common v9.0.1 2022-12-07 */
647
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
647
648
 
648
649
  /*
649
650
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -718,7 +719,7 @@ var DEFAULT_CRYPTO_IMPLEMENTATION = {
718
719
  }
719
720
  };
720
721
 
721
- /*! @azure/msal-common v9.0.1 2022-12-07 */
722
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
722
723
 
723
724
  /*
724
725
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1213,7 +1214,7 @@ var ClientAuthError = /** @class */ (function (_super) {
1213
1214
  return ClientAuthError;
1214
1215
  }(AuthError));
1215
1216
 
1216
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1217
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1217
1218
 
1218
1219
  /*
1219
1220
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1338,7 +1339,7 @@ var StringUtils = /** @class */ (function () {
1338
1339
  return StringUtils;
1339
1340
  }());
1340
1341
 
1341
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1342
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1342
1343
 
1343
1344
  /*
1344
1345
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1365,13 +1366,23 @@ var Logger = /** @class */ (function () {
1365
1366
  var defaultLoggerCallback = function () {
1366
1367
  return;
1367
1368
  };
1368
- this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;
1369
- this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;
1370
- this.level = typeof (loggerOptions.logLevel) === "number" ? loggerOptions.logLevel : exports.LogLevel.Info;
1371
- this.correlationId = loggerOptions.correlationId || Constants.EMPTY_STRING;
1369
+ var setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();
1370
+ this.localCallback = setLoggerOptions.loggerCallback || defaultLoggerCallback;
1371
+ this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;
1372
+ this.level = typeof (setLoggerOptions.logLevel) === "number" ? setLoggerOptions.logLevel : exports.LogLevel.Info;
1373
+ this.correlationId = setLoggerOptions.correlationId || Constants.EMPTY_STRING;
1372
1374
  this.packageName = packageName || Constants.EMPTY_STRING;
1373
1375
  this.packageVersion = packageVersion || Constants.EMPTY_STRING;
1374
1376
  }
1377
+ Logger.createDefaultLoggerOptions = function () {
1378
+ return {
1379
+ loggerCallback: function () {
1380
+ // allow users to not set loggerCallback
1381
+ },
1382
+ piiLoggingEnabled: false,
1383
+ logLevel: exports.LogLevel.Info
1384
+ };
1385
+ };
1375
1386
  /**
1376
1387
  * Create new Logger with existing configurations.
1377
1388
  */
@@ -1518,12 +1529,12 @@ var Logger = /** @class */ (function () {
1518
1529
  return Logger;
1519
1530
  }());
1520
1531
 
1521
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1532
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1522
1533
  /* eslint-disable header/header */
1523
1534
  var name$1 = "@azure/msal-common";
1524
- var version$1 = "9.0.1";
1535
+ var version$1 = "9.0.2";
1525
1536
 
1526
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1537
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1527
1538
  /*
1528
1539
  * Copyright (c) Microsoft Corporation. All rights reserved.
1529
1540
  * Licensed under the MIT License.
@@ -1544,7 +1555,7 @@ exports.AzureCloudInstance = void 0;
1544
1555
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1545
1556
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1546
1557
 
1547
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1558
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1548
1559
 
1549
1560
  /*
1550
1561
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1621,19 +1632,16 @@ var CredentialEntity = /** @class */ (function () {
1621
1632
  * @param key
1622
1633
  */
1623
1634
  CredentialEntity.getCredentialType = function (key) {
1624
- // First keyword search will match all "AccessToken" and "AccessToken_With_AuthScheme" credentials
1625
- if (key.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase()) !== -1) {
1626
- // Perform second search to differentiate between "AccessToken" and "AccessToken_With_AuthScheme" credential types
1627
- if (key.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) !== -1) {
1628
- return CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
1635
+ var separator = Separators.CACHE_KEY_SEPARATOR;
1636
+ // Match host names like "login.microsoftonline.com", "https://accounts.google.com:4000", etc.
1637
+ var domainRe = "(https?:\\/\\/)?([\\w-]+\\.)*([\\w-]{1,63})(\\.(\\w{2,3}))(\\:[0-9]{4,5})?";
1638
+ for (var _i = 0, _a = Object.keys(CredentialType); _i < _a.length; _i++) {
1639
+ var credKey = _a[_i];
1640
+ var credVal = CredentialType[credKey].toLowerCase();
1641
+ // Verify credential type is preceded by a valid host name (environment)
1642
+ if (key.toLowerCase().search("(?<=" + separator + domainRe + ")" + separator + credVal + separator) !== -1) {
1643
+ return CredentialType[credKey];
1629
1644
  }
1630
- return CredentialType.ACCESS_TOKEN;
1631
- }
1632
- else if (key.indexOf(CredentialType.ID_TOKEN.toLowerCase()) !== -1) {
1633
- return CredentialType.ID_TOKEN;
1634
- }
1635
- else if (key.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) !== -1) {
1636
- return CredentialType.REFRESH_TOKEN;
1637
1645
  }
1638
1646
  return Constants.NOT_DEFINED;
1639
1647
  };
@@ -1703,7 +1711,7 @@ var CredentialEntity = /** @class */ (function () {
1703
1711
  return CredentialEntity;
1704
1712
  }());
1705
1713
 
1706
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1714
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1707
1715
 
1708
1716
  /*
1709
1717
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1958,7 +1966,7 @@ var ClientConfigurationError = /** @class */ (function (_super) {
1958
1966
  return ClientConfigurationError;
1959
1967
  }(ClientAuthError));
1960
1968
 
1961
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1969
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1962
1970
 
1963
1971
  /*
1964
1972
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2142,7 +2150,7 @@ var ScopeSet = /** @class */ (function () {
2142
2150
  return ScopeSet;
2143
2151
  }());
2144
2152
 
2145
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2153
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2146
2154
 
2147
2155
  /*
2148
2156
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2180,7 +2188,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2180
2188
  };
2181
2189
  }
2182
2190
 
2183
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2191
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2184
2192
  /*
2185
2193
  * Copyright (c) Microsoft Corporation. All rights reserved.
2186
2194
  * Licensed under the MIT License.
@@ -2195,7 +2203,7 @@ var AuthorityType;
2195
2203
  AuthorityType[AuthorityType["Dsts"] = 2] = "Dsts";
2196
2204
  })(AuthorityType || (AuthorityType = {}));
2197
2205
 
2198
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2206
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2199
2207
 
2200
2208
  /*
2201
2209
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2434,7 +2442,7 @@ var AccountEntity = /** @class */ (function () {
2434
2442
  return AccountEntity;
2435
2443
  }());
2436
2444
 
2437
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2445
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2438
2446
 
2439
2447
  /*
2440
2448
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2486,7 +2494,7 @@ var AuthToken = /** @class */ (function () {
2486
2494
  return AuthToken;
2487
2495
  }());
2488
2496
 
2489
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2497
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2490
2498
 
2491
2499
  /*
2492
2500
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3365,7 +3373,7 @@ var DefaultStorageClass = /** @class */ (function (_super) {
3365
3373
  return DefaultStorageClass;
3366
3374
  }(CacheManager));
3367
3375
 
3368
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3376
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3369
3377
 
3370
3378
  /*
3371
3379
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3459,7 +3467,7 @@ function buildAuthOptions(authOptions) {
3459
3467
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3460
3468
  }
3461
3469
 
3462
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3470
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3463
3471
 
3464
3472
  /*
3465
3473
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3479,7 +3487,7 @@ var ServerError = /** @class */ (function (_super) {
3479
3487
  return ServerError;
3480
3488
  }(AuthError));
3481
3489
 
3482
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3490
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3483
3491
 
3484
3492
  /*
3485
3493
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3575,7 +3583,7 @@ var ThrottlingUtils = /** @class */ (function () {
3575
3583
  return ThrottlingUtils;
3576
3584
  }());
3577
3585
 
3578
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3586
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3579
3587
 
3580
3588
  /*
3581
3589
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3624,7 +3632,7 @@ var NetworkManager = /** @class */ (function () {
3624
3632
  return NetworkManager;
3625
3633
  }());
3626
3634
 
3627
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3635
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3628
3636
  /*
3629
3637
  * Copyright (c) Microsoft Corporation. All rights reserved.
3630
3638
  * Licensed under the MIT License.
@@ -3635,7 +3643,7 @@ var CcsCredentialType;
3635
3643
  CcsCredentialType["UPN"] = "UPN";
3636
3644
  })(CcsCredentialType || (CcsCredentialType = {}));
3637
3645
 
3638
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3646
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3639
3647
 
3640
3648
  /*
3641
3649
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3726,7 +3734,7 @@ var BaseClient = /** @class */ (function () {
3726
3734
  return BaseClient;
3727
3735
  }());
3728
3736
 
3729
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3737
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3730
3738
 
3731
3739
  /*
3732
3740
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3812,7 +3820,7 @@ var RequestValidator = /** @class */ (function () {
3812
3820
  return RequestValidator;
3813
3821
  }());
3814
3822
 
3815
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3823
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3816
3824
 
3817
3825
  /*
3818
3826
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4190,7 +4198,7 @@ var RequestParameterBuilder = /** @class */ (function () {
4190
4198
  return RequestParameterBuilder;
4191
4199
  }());
4192
4200
 
4193
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4201
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4194
4202
 
4195
4203
  /*
4196
4204
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4254,7 +4262,7 @@ var IdTokenEntity = /** @class */ (function (_super) {
4254
4262
  return IdTokenEntity;
4255
4263
  }(CredentialEntity));
4256
4264
 
4257
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4265
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4258
4266
  /*
4259
4267
  * Copyright (c) Microsoft Corporation. All rights reserved.
4260
4268
  * Licensed under the MIT License.
@@ -4304,7 +4312,7 @@ var TimeUtils = /** @class */ (function () {
4304
4312
  return TimeUtils;
4305
4313
  }());
4306
4314
 
4307
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4315
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4308
4316
 
4309
4317
  /*
4310
4318
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4418,7 +4426,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4418
4426
  return AccessTokenEntity;
4419
4427
  }(CredentialEntity));
4420
4428
 
4421
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4429
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4422
4430
 
4423
4431
  /*
4424
4432
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4485,7 +4493,7 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
4485
4493
  return RefreshTokenEntity;
4486
4494
  }(CredentialEntity));
4487
4495
 
4488
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4496
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4489
4497
 
4490
4498
  /*
4491
4499
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4560,7 +4568,7 @@ var InteractionRequiredAuthError = /** @class */ (function (_super) {
4560
4568
  return InteractionRequiredAuthError;
4561
4569
  }(AuthError));
4562
4570
 
4563
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4571
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4564
4572
  /*
4565
4573
  * Copyright (c) Microsoft Corporation. All rights reserved.
4566
4574
  * Licensed under the MIT License.
@@ -4576,7 +4584,7 @@ var CacheRecord = /** @class */ (function () {
4576
4584
  return CacheRecord;
4577
4585
  }());
4578
4586
 
4579
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4587
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4580
4588
 
4581
4589
  /*
4582
4590
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4647,7 +4655,7 @@ var ProtocolUtils = /** @class */ (function () {
4647
4655
  return ProtocolUtils;
4648
4656
  }());
4649
4657
 
4650
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4658
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4651
4659
 
4652
4660
  /*
4653
4661
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4881,7 +4889,7 @@ var UrlString = /** @class */ (function () {
4881
4889
  return UrlString;
4882
4890
  }());
4883
4891
 
4884
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4892
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4885
4893
 
4886
4894
  /*
4887
4895
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4982,7 +4990,7 @@ var PopTokenGenerator = /** @class */ (function () {
4982
4990
  return PopTokenGenerator;
4983
4991
  }());
4984
4992
 
4985
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4993
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4986
4994
 
4987
4995
  /*
4988
4996
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5052,7 +5060,7 @@ var AppMetadataEntity = /** @class */ (function () {
5052
5060
  return AppMetadataEntity;
5053
5061
  }());
5054
5062
 
5055
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5063
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5056
5064
  /*
5057
5065
  * Copyright (c) Microsoft Corporation. All rights reserved.
5058
5066
  * Licensed under the MIT License.
@@ -5088,7 +5096,7 @@ var AppMetadataEntity = /** @class */ (function () {
5088
5096
  return TokenCacheContext;
5089
5097
  }());
5090
5098
 
5091
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5099
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5092
5100
 
5093
5101
  /*
5094
5102
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5359,7 +5367,7 @@ var ResponseHandler = /** @class */ (function () {
5359
5367
  cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,
5360
5368
  msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING,
5361
5369
  code: code,
5362
- fromNativeBroker: false
5370
+ fromNativeBroker: false,
5363
5371
  }];
5364
5372
  }
5365
5373
  });
@@ -5368,7 +5376,7 @@ var ResponseHandler = /** @class */ (function () {
5368
5376
  return ResponseHandler;
5369
5377
  }());
5370
5378
 
5371
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5379
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5372
5380
 
5373
5381
  /*
5374
5382
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5379,8 +5387,8 @@ var ResponseHandler = /** @class */ (function () {
5379
5387
  */
5380
5388
  var AuthorizationCodeClient = /** @class */ (function (_super) {
5381
5389
  __extends(AuthorizationCodeClient, _super);
5382
- function AuthorizationCodeClient(configuration) {
5383
- var _this = _super.call(this, configuration) || this;
5390
+ function AuthorizationCodeClient(configuration, performanceClient) {
5391
+ var _this = _super.call(this, configuration, performanceClient) || this;
5384
5392
  // Flag to indicate if client is for hybrid spa auth code redemption
5385
5393
  _this.includeRedirectUri = true;
5386
5394
  return _this;
@@ -5414,26 +5422,47 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5414
5422
  * @param request
5415
5423
  */
5416
5424
  AuthorizationCodeClient.prototype.acquireToken = function (request, authCodePayload) {
5417
- var _a;
5425
+ var _a, _b, _c;
5418
5426
  return __awaiter(this, void 0, void 0, function () {
5419
- var reqTimestamp, response, requestId, responseHandler;
5420
- return __generator(this, function (_b) {
5421
- switch (_b.label) {
5427
+ var atsMeasurement, reqTimestamp, response, requestId, httpVerAuthority, responseHandler;
5428
+ var _this = this;
5429
+ return __generator(this, function (_d) {
5430
+ switch (_d.label) {
5422
5431
  case 0:
5423
- this.logger.info("in acquireToken call");
5432
+ atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("AuthCodeClientAcquireToken", request.correlationId);
5433
+ this.logger.info("in acquireToken call in auth-code client");
5424
5434
  if (!request || StringUtils.isEmpty(request.code)) {
5425
5435
  throw ClientAuthError.createTokenRequestCannotBeMadeError();
5426
5436
  }
5427
5437
  reqTimestamp = TimeUtils.nowSeconds();
5428
5438
  return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
5429
5439
  case 1:
5430
- response = _b.sent();
5431
- requestId = (_a = response.headers) === null || _a === void 0 ? void 0 : _a[HeaderNames.X_MS_REQUEST_ID];
5440
+ response = _d.sent();
5441
+ requestId = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_REQUEST_ID];
5442
+ httpVerAuthority = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_HTTP_VERSION];
5443
+ if (httpVerAuthority) {
5444
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5445
+ httpVerAuthority: httpVerAuthority
5446
+ });
5447
+ }
5432
5448
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5433
5449
  // Validate response. This function throws a server error if an error is returned by the server.
5434
5450
  responseHandler.validateTokenResponse(response.body);
5435
- return [4 /*yield*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId)];
5436
- case 2: return [2 /*return*/, _b.sent()];
5451
+ return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId).then(function (result) {
5452
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5453
+ success: true
5454
+ });
5455
+ return result;
5456
+ })
5457
+ .catch(function (error) {
5458
+ _this.logger.verbose("Error in fetching token in ACC", request.correlationId);
5459
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5460
+ errorCode: error.errorCode,
5461
+ subErrorCode: error.subError,
5462
+ success: false
5463
+ });
5464
+ throw error;
5465
+ })];
5437
5466
  }
5438
5467
  });
5439
5468
  });
@@ -5821,7 +5850,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5821
5850
  return AuthorizationCodeClient;
5822
5851
  }(BaseClient));
5823
5852
 
5824
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5853
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5825
5854
  /*
5826
5855
  * Copyright (c) Microsoft Corporation. All rights reserved.
5827
5856
  * Licensed under the MIT License.
@@ -5932,6 +5961,11 @@ exports.PerformanceEvents = void 0;
5932
5961
  * Time taken for acquiring cached refresh token
5933
5962
  */
5934
5963
  PerformanceEvents["RefreshTokenClientAcquireTokenWithCachedRefreshToken"] = "refreshTokenClientAcquireTokenWithCachedRefreshToken";
5964
+ PerformanceEvents["GetEndpointMetadataFromNetwork"] = "getEndpointMetadataFromNetwork";
5965
+ PerformanceEvents["GetCloudDiscoveryMetadataFromNetworkMeasurement"] = "getCloudDiscoveryMetadataFromNetworkMeasurement";
5966
+ PerformanceEvents["HandleRedirectPromiseMeasurement"] = "handleRedirectPromiseMeasurement";
5967
+ PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
5968
+ PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5935
5969
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5936
5970
  /**
5937
5971
  * State of the performance event.
@@ -5946,7 +5980,7 @@ var PerformanceEventStatus;
5946
5980
  PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
5947
5981
  })(PerformanceEventStatus || (PerformanceEventStatus = {}));
5948
5982
 
5949
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5983
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5950
5984
 
5951
5985
  /*
5952
5986
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5961,23 +5995,29 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5961
5995
  return _super.call(this, configuration, performanceClient) || this;
5962
5996
  }
5963
5997
  RefreshTokenClient.prototype.acquireToken = function (request) {
5964
- var _a, _b, _c;
5998
+ var _a, _b, _c, _d;
5965
5999
  return __awaiter(this, void 0, void 0, function () {
5966
- var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
6000
+ var atsMeasurement, reqTimestamp, response, httpVerToken, requestId, responseHandler;
5967
6001
  var _this = this;
5968
- return __generator(this, function (_d) {
5969
- switch (_d.label) {
6002
+ return __generator(this, function (_e) {
6003
+ switch (_e.label) {
5970
6004
  case 0:
5971
6005
  atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
5972
6006
  this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
5973
6007
  reqTimestamp = TimeUtils.nowSeconds();
5974
6008
  return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
5975
6009
  case 1:
5976
- response = _d.sent();
6010
+ response = _e.sent();
6011
+ httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_HTTP_VERSION];
5977
6012
  atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5978
- refreshTokenSize: ((_b = response.body.refresh_token) === null || _b === void 0 ? void 0 : _b.length) || 0
6013
+ refreshTokenSize: ((_c = response.body.refresh_token) === null || _c === void 0 ? void 0 : _c.length) || 0,
5979
6014
  });
5980
- requestId = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_REQUEST_ID];
6015
+ if (httpVerToken) {
6016
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6017
+ httpVerToken: httpVerToken,
6018
+ });
6019
+ }
6020
+ requestId = (_d = response.headers) === null || _d === void 0 ? void 0 : _d[HeaderNames.X_MS_REQUEST_ID];
5981
6021
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5982
6022
  responseHandler.validateTokenResponse(response.body);
5983
6023
  return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
@@ -6211,7 +6251,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
6211
6251
  return RefreshTokenClient;
6212
6252
  }(BaseClient));
6213
6253
 
6214
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6254
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6215
6255
 
6216
6256
  /*
6217
6257
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6335,7 +6375,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
6335
6375
  return SilentFlowClient;
6336
6376
  }(BaseClient));
6337
6377
 
6338
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6378
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6339
6379
  /*
6340
6380
  * Copyright (c) Microsoft Corporation. All rights reserved.
6341
6381
  * Licensed under the MIT License.
@@ -6347,7 +6387,7 @@ function isOpenIdConfigResponse(response) {
6347
6387
  response.hasOwnProperty("jwks_uri"));
6348
6388
  }
6349
6389
 
6350
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6390
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6351
6391
  /*
6352
6392
  * Copyright (c) Microsoft Corporation. All rights reserved.
6353
6393
  * Licensed under the MIT License.
@@ -6356,7 +6396,7 @@ var rawMetdataJSON = { "endpointMetadata": { "https://login.microsoftonline.com/
6356
6396
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6357
6397
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6358
6398
 
6359
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6399
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6360
6400
  /*
6361
6401
  * Copyright (c) Microsoft Corporation. All rights reserved.
6362
6402
  * Licensed under the MIT License.
@@ -6370,7 +6410,7 @@ exports.ProtocolMode = void 0;
6370
6410
  ProtocolMode["OIDC"] = "OIDC";
6371
6411
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6372
6412
 
6373
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6413
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6374
6414
 
6375
6415
  /*
6376
6416
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6447,7 +6487,7 @@ var AuthorityMetadataEntity = /** @class */ (function () {
6447
6487
  return AuthorityMetadataEntity;
6448
6488
  }());
6449
6489
 
6450
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6490
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6451
6491
  /*
6452
6492
  * Copyright (c) Microsoft Corporation. All rights reserved.
6453
6493
  * Licensed under the MIT License.
@@ -6457,7 +6497,7 @@ function isCloudInstanceDiscoveryResponse(response) {
6457
6497
  response.hasOwnProperty("metadata"));
6458
6498
  }
6459
6499
 
6460
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6500
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6461
6501
  /*
6462
6502
  * Copyright (c) Microsoft Corporation. All rights reserved.
6463
6503
  * Licensed under the MIT License.
@@ -6467,7 +6507,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
6467
6507
  response.hasOwnProperty("error_description"));
6468
6508
  }
6469
6509
 
6470
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6510
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6471
6511
 
6472
6512
  /*
6473
6513
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6589,7 +6629,7 @@ var RegionDiscovery = /** @class */ (function () {
6589
6629
  return RegionDiscovery;
6590
6630
  }());
6591
6631
 
6592
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6632
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6593
6633
 
6594
6634
  /*
6595
6635
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7311,7 +7351,7 @@ var Authority = /** @class */ (function () {
7311
7351
  return Authority;
7312
7352
  }());
7313
7353
 
7314
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7354
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7315
7355
 
7316
7356
  /*
7317
7357
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7372,7 +7412,7 @@ var AuthorityFactory = /** @class */ (function () {
7372
7412
  return AuthorityFactory;
7373
7413
  }());
7374
7414
 
7375
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7415
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7376
7416
 
7377
7417
  /*
7378
7418
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7403,7 +7443,7 @@ var ServerTelemetryEntity = /** @class */ (function () {
7403
7443
  return ServerTelemetryEntity;
7404
7444
  }());
7405
7445
 
7406
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7446
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7407
7447
 
7408
7448
  /*
7409
7449
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7431,7 +7471,7 @@ var ThrottlingEntity = /** @class */ (function () {
7431
7471
  return ThrottlingEntity;
7432
7472
  }());
7433
7473
 
7434
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7474
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7435
7475
 
7436
7476
  /*
7437
7477
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7448,7 +7488,7 @@ var StubbedNetworkModule = {
7448
7488
  }
7449
7489
  };
7450
7490
 
7451
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7491
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7452
7492
 
7453
7493
  /*
7454
7494
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7493,7 +7533,7 @@ var JoseHeaderError = /** @class */ (function (_super) {
7493
7533
  return JoseHeaderError;
7494
7534
  }(AuthError));
7495
7535
 
7496
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7536
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7497
7537
 
7498
7538
  /*
7499
7539
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7533,7 +7573,7 @@ var JoseHeader = /** @class */ (function () {
7533
7573
  return JoseHeader;
7534
7574
  }());
7535
7575
 
7536
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7576
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7537
7577
 
7538
7578
  /*
7539
7579
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7592,7 +7632,7 @@ var AuthenticationHeaderParser = /** @class */ (function () {
7592
7632
  return AuthenticationHeaderParser;
7593
7633
  }());
7594
7634
 
7595
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7635
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7596
7636
 
7597
7637
  /*
7598
7638
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7754,7 +7794,7 @@ var ServerTelemetryManager = /** @class */ (function () {
7754
7794
  return ServerTelemetryManager;
7755
7795
  }());
7756
7796
 
7757
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7797
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7758
7798
 
7759
7799
  /*
7760
7800
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7800,7 +7840,7 @@ var PerformanceClient = /** @class */ (function () {
7800
7840
  this.logger.info("PerformanceClient: No correlation id provided for " + measureName + ", generating", eventCorrelationId);
7801
7841
  }
7802
7842
  this.logger.trace("PerformanceClient: Performance measurement started for " + measureName, eventCorrelationId);
7803
- var performanceMeasurement = this.startPerformanceMeasuremeant(measureName, eventCorrelationId);
7843
+ var performanceMeasurement = this.startPerformanceMeasurement(measureName, eventCorrelationId);
7804
7844
  performanceMeasurement.startMeasurement();
7805
7845
  var inProgressEvent = {
7806
7846
  eventId: this.generateId(),
@@ -8049,7 +8089,7 @@ var PerformanceClient = /** @class */ (function () {
8049
8089
  return PerformanceClient;
8050
8090
  }());
8051
8091
 
8052
- /*! @azure/msal-common v9.0.1 2022-12-07 */
8092
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
8053
8093
 
8054
8094
  /*
8055
8095
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8075,7 +8115,7 @@ var StubPerformanceClient = /** @class */ (function (_super) {
8075
8115
  StubPerformanceClient.prototype.generateId = function () {
8076
8116
  return "callback-id";
8077
8117
  };
8078
- StubPerformanceClient.prototype.startPerformanceMeasuremeant = function () {
8118
+ StubPerformanceClient.prototype.startPerformanceMeasurement = function () {
8079
8119
  return new StubPerformanceMeasurement();
8080
8120
  };
8081
8121
  return StubPerformanceClient;
@@ -9321,17 +9361,17 @@ var BrowserCacheManager = /** @class */ (function (_super) {
9321
9361
  var activeAccountValueFilters = this.getItem(activeAccountKeyFilters);
9322
9362
  if (!activeAccountValueFilters) {
9323
9363
  // if new active account cache type isn't found, it's an old version, so look for that instead
9324
- this.logger.trace("No active account filters cache schema found, looking for legacy schema");
9364
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");
9325
9365
  var activeAccountKeyLocal = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);
9326
9366
  var activeAccountValueLocal = this.getItem(activeAccountKeyLocal);
9327
9367
  if (!activeAccountValueLocal) {
9328
- this.logger.trace("No active account found");
9368
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9329
9369
  return null;
9330
9370
  }
9331
9371
  var activeAccount = this.getAccountInfoByFilter({ localAccountId: activeAccountValueLocal })[0] || null;
9332
9372
  if (activeAccount) {
9333
- this.logger.trace("Legacy active account cache schema found");
9334
- this.logger.trace("Adding active account filters cache schema");
9373
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found");
9374
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema");
9335
9375
  this.setActiveAccount(activeAccount);
9336
9376
  return activeAccount;
9337
9377
  }
@@ -9339,13 +9379,13 @@ var BrowserCacheManager = /** @class */ (function (_super) {
9339
9379
  }
9340
9380
  var activeAccountValueObj = this.validateAndParseJson(activeAccountValueFilters);
9341
9381
  if (activeAccountValueObj) {
9342
- this.logger.trace("Active account filters schema found");
9382
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found");
9343
9383
  return this.getAccountInfoByFilter({
9344
9384
  homeAccountId: activeAccountValueObj.homeAccountId,
9345
9385
  localAccountId: activeAccountValueObj.localAccountId
9346
9386
  })[0] || null;
9347
9387
  }
9348
- this.logger.trace("No active account found");
9388
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9349
9389
  return null;
9350
9390
  };
9351
9391
  /**
@@ -9376,6 +9416,7 @@ var BrowserCacheManager = /** @class */ (function (_super) {
9376
9416
  */
9377
9417
  BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {
9378
9418
  var allAccounts = this.getAllAccounts();
9419
+ this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total " + allAccounts.length + " accounts found");
9379
9420
  return allAccounts.filter(function (accountObj) {
9380
9421
  if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {
9381
9422
  return false;
@@ -9938,7 +9979,7 @@ var DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {
9938
9979
 
9939
9980
  /* eslint-disable header/header */
9940
9981
  var name = "@azure/msal-browser";
9941
- var version = "2.32.1";
9982
+ var version = "2.32.2";
9942
9983
 
9943
9984
  /*
9944
9985
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10642,7 +10683,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10642
10683
  */
10643
10684
  StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
10644
10685
  return __awaiter$1(this, void 0, void 0, function () {
10645
- var discoveredAuthority;
10686
+ var discoveredAuthority, logger;
10646
10687
  return __generator$1(this, function (_a) {
10647
10688
  switch (_a.label) {
10648
10689
  case 0:
@@ -10650,6 +10691,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10650
10691
  return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions)];
10651
10692
  case 1:
10652
10693
  discoveredAuthority = _a.sent();
10694
+ logger = this.config.system.loggerOptions;
10653
10695
  return [2 /*return*/, {
10654
10696
  authOptions: {
10655
10697
  clientId: this.config.auth.clientId,
@@ -10661,9 +10703,9 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10661
10703
  preventCorsPreflight: true
10662
10704
  },
10663
10705
  loggerOptions: {
10664
- loggerCallback: this.config.system.loggerOptions.loggerCallback,
10665
- piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,
10666
- logLevel: this.config.system.loggerOptions.logLevel,
10706
+ loggerCallback: logger.loggerCallback,
10707
+ piiLoggingEnabled: logger.piiLoggingEnabled,
10708
+ logLevel: logger.logLevel,
10667
10709
  correlationId: this.correlationId
10668
10710
  },
10669
10711
  cryptoInterface: this.browserCrypto,
@@ -10707,13 +10749,14 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10707
10749
  * @param requestCorrelationId
10708
10750
  */
10709
10751
  StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority, requestAzureCloudOptions) {
10752
+ var _a;
10710
10753
  return __awaiter$1(this, void 0, void 0, function () {
10711
10754
  var getAuthorityMeasurement, authorityOptions, userAuthority, builtAuthority;
10712
- return __generator$1(this, function (_a) {
10713
- switch (_a.label) {
10755
+ return __generator$1(this, function (_b) {
10756
+ switch (_b.label) {
10714
10757
  case 0:
10715
10758
  this.logger.verbose("getDiscoveredAuthority called", this.correlationId);
10716
- getAuthorityMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10759
+ getAuthorityMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10717
10760
  authorityOptions = {
10718
10761
  protocolMode: this.config.auth.protocolMode,
10719
10762
  knownAuthorities: this.config.auth.knownAuthorities,
@@ -10727,7 +10770,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10727
10770
  return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
10728
10771
  .then(function (result) {
10729
10772
  getAuthorityMeasurement.endMeasurement({
10730
- success: true
10773
+ success: true,
10731
10774
  });
10732
10775
  return result;
10733
10776
  })
@@ -10739,7 +10782,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10739
10782
  });
10740
10783
  throw error;
10741
10784
  })];
10742
- case 1: return [2 /*return*/, _a.sent()];
10785
+ case 1: return [2 /*return*/, _b.sent()];
10743
10786
  }
10744
10787
  });
10745
10788
  });
@@ -12911,7 +12954,9 @@ function buildConfiguration(_a, isBrowserEnvironment) {
12911
12954
  // Default logger options for browser
12912
12955
  var DEFAULT_LOGGER_OPTIONS = {
12913
12956
  // eslint-disable-next-line @typescript-eslint/no-empty-function
12914
- loggerCallback: function () { },
12957
+ loggerCallback: function () {
12958
+ // allow users to not set logger call back
12959
+ },
12915
12960
  logLevel: exports.LogLevel.Info,
12916
12961
  piiLoggingEnabled: false
12917
12962
  };
@@ -12922,6 +12967,7 @@ function buildConfiguration(_a, isBrowserEnvironment) {
12922
12967
  useMsrCrypto: false,
12923
12968
  entropy: undefined
12924
12969
  } });
12970
+ var providedSystemOptions = __assign$1(__assign$1({}, userInputSystem), { loggerOptions: (userInputSystem === null || userInputSystem === void 0 ? void 0 : userInputSystem.loggerOptions) || DEFAULT_LOGGER_OPTIONS });
12925
12971
  var DEFAULT_TELEMETRY_OPTIONS = {
12926
12972
  application: {
12927
12973
  appName: Constants.EMPTY_STRING,
@@ -12931,7 +12977,7 @@ function buildConfiguration(_a, isBrowserEnvironment) {
12931
12977
  var overlayedConfig = {
12932
12978
  auth: __assign$1(__assign$1({}, DEFAULT_AUTH_OPTIONS), userInputAuth),
12933
12979
  cache: __assign$1(__assign$1({}, DEFAULT_CACHE_OPTIONS), userInputCache),
12934
- system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), userInputSystem),
12980
+ system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), providedSystemOptions),
12935
12981
  telemetry: __assign$1(__assign$1({}, DEFAULT_TELEMETRY_OPTIONS), userInputTelemetry)
12936
12982
  };
12937
12983
  return overlayedConfig;
@@ -13422,27 +13468,6 @@ var EventHandler = /** @class */ (function () {
13422
13468
  return EventHandler;
13423
13469
  }());
13424
13470
 
13425
- /*
13426
- * Copyright (c) Microsoft Corporation. All rights reserved.
13427
- * Licensed under the MIT License.
13428
- */
13429
-
13430
- var internals = /*#__PURE__*/Object.freeze({
13431
- __proto__: null,
13432
- BrowserCacheManager: BrowserCacheManager,
13433
- StandardInteractionClient: StandardInteractionClient,
13434
- RedirectClient: RedirectClient,
13435
- PopupClient: PopupClient,
13436
- SilentIframeClient: SilentIframeClient,
13437
- SilentCacheClient: SilentCacheClient,
13438
- SilentRefreshClient: SilentRefreshClient,
13439
- RedirectHandler: RedirectHandler,
13440
- EventHandler: EventHandler,
13441
- NativeMessageHandler: NativeMessageHandler,
13442
- BrowserConstants: BrowserConstants,
13443
- get TemporaryCacheKeys () { return TemporaryCacheKeys; }
13444
- });
13445
-
13446
13471
  /*
13447
13472
  * Copyright (c) Microsoft Corporation. All rights reserved.
13448
13473
  * Licensed under the MIT License.
@@ -14977,6 +15002,29 @@ var CryptoOps = /** @class */ (function () {
14977
15002
  return CryptoOps;
14978
15003
  }());
14979
15004
 
15005
+ /*
15006
+ * Copyright (c) Microsoft Corporation. All rights reserved.
15007
+ * Licensed under the MIT License.
15008
+ */
15009
+
15010
+ var internals = /*#__PURE__*/Object.freeze({
15011
+ __proto__: null,
15012
+ BrowserCacheManager: BrowserCacheManager,
15013
+ StandardInteractionClient: StandardInteractionClient,
15014
+ RedirectClient: RedirectClient,
15015
+ PopupClient: PopupClient,
15016
+ SilentIframeClient: SilentIframeClient,
15017
+ SilentCacheClient: SilentCacheClient,
15018
+ SilentRefreshClient: SilentRefreshClient,
15019
+ RedirectHandler: RedirectHandler,
15020
+ EventHandler: EventHandler,
15021
+ NativeMessageHandler: NativeMessageHandler,
15022
+ BrowserConstants: BrowserConstants,
15023
+ get TemporaryCacheKeys () { return TemporaryCacheKeys; },
15024
+ CryptoOps: CryptoOps,
15025
+ NativeAuthError: NativeAuthError
15026
+ });
15027
+
14980
15028
  /*
14981
15029
  * Copyright (c) Microsoft Corporation. All rights reserved.
14982
15030
  * Licensed under the MIT License.
@@ -15356,7 +15404,7 @@ var BrowserPerformanceClient = /** @class */ (function (_super) {
15356
15404
  _this.guidGenerator = new GuidGenerator(_this.browserCrypto);
15357
15405
  return _this;
15358
15406
  }
15359
- BrowserPerformanceClient.prototype.startPerformanceMeasuremeant = function (measureName, correlationId) {
15407
+ BrowserPerformanceClient.prototype.startPerformanceMeasurement = function (measureName, correlationId) {
15360
15408
  return new BrowserPerformanceMeasurement(measureName, correlationId);
15361
15409
  };
15362
15410
  BrowserPerformanceClient.prototype.generateId = function () {
@@ -16461,7 +16509,8 @@ var PublicClientApplication = /** @class */ (function (_super) {
16461
16509
  success: true,
16462
16510
  fromCache: result.fromCache,
16463
16511
  isNativeBroker: result.fromNativeBroker,
16464
- requestId: result.requestId
16512
+ cacheLookupPolicy: request.cacheLookupPolicy,
16513
+ requestId: result.requestId,
16465
16514
  });
16466
16515
  atsMeasurement.flushMeasurement();
16467
16516
  return result;
@@ -16499,13 +16548,13 @@ var PublicClientApplication = /** @class */ (function (_super) {
16499
16548
  */
16500
16549
  PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
16501
16550
  return __awaiter$1(this, void 0, void 0, function () {
16502
- var astsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16551
+ var atsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16503
16552
  var _this = this;
16504
16553
  return __generator$1(this, function (_a) {
16505
16554
  switch (_a.label) {
16506
16555
  case 0:
16507
16556
  this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
16508
- astsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16557
+ atsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16509
16558
  if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
16510
16559
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
16511
16560
  silentRequest = __assign$1(__assign$1({}, request), { account: account });
@@ -16558,7 +16607,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
16558
16607
  _a.label = 3;
16559
16608
  case 3: return [2 /*return*/, result.then(function (response) {
16560
16609
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
16561
- astsAsyncMeasurement.endMeasurement({
16610
+ atsAsyncMeasurement.endMeasurement({
16562
16611
  success: true,
16563
16612
  fromCache: response.fromCache,
16564
16613
  isNativeBroker: response.fromNativeBroker,
@@ -16567,7 +16616,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
16567
16616
  return response;
16568
16617
  }).catch(function (tokenRenewalError) {
16569
16618
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
16570
- astsAsyncMeasurement.endMeasurement({
16619
+ atsAsyncMeasurement.endMeasurement({
16571
16620
  errorCode: tokenRenewalError.errorCode,
16572
16621
  subErrorCode: tokenRenewalError.subError,
16573
16622
  success: false