@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
@@ -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
  (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.2 2023-01-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.2 2023-01-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.
@@ -589,7 +590,7 @@
589
590
  JsonTypes["Jwk"] = "JWK";
590
591
  })(JsonTypes || (JsonTypes = {}));
591
592
 
592
- /*! @azure/msal-common v9.0.1 2022-12-07 */
593
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
593
594
 
594
595
  /*
595
596
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -645,7 +646,7 @@
645
646
  return AuthError;
646
647
  }(Error));
647
648
 
648
- /*! @azure/msal-common v9.0.1 2022-12-07 */
649
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
649
650
 
650
651
  /*
651
652
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -720,7 +721,7 @@
720
721
  }
721
722
  };
722
723
 
723
- /*! @azure/msal-common v9.0.1 2022-12-07 */
724
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
724
725
 
725
726
  /*
726
727
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1215,7 +1216,7 @@
1215
1216
  return ClientAuthError;
1216
1217
  }(AuthError));
1217
1218
 
1218
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1219
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1219
1220
 
1220
1221
  /*
1221
1222
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1340,7 +1341,7 @@
1340
1341
  return StringUtils;
1341
1342
  }());
1342
1343
 
1343
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1344
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1344
1345
 
1345
1346
  /*
1346
1347
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1367,13 +1368,23 @@
1367
1368
  var defaultLoggerCallback = function () {
1368
1369
  return;
1369
1370
  };
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;
1371
+ var setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();
1372
+ this.localCallback = setLoggerOptions.loggerCallback || defaultLoggerCallback;
1373
+ this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;
1374
+ this.level = typeof (setLoggerOptions.logLevel) === "number" ? setLoggerOptions.logLevel : exports.LogLevel.Info;
1375
+ this.correlationId = setLoggerOptions.correlationId || Constants.EMPTY_STRING;
1374
1376
  this.packageName = packageName || Constants.EMPTY_STRING;
1375
1377
  this.packageVersion = packageVersion || Constants.EMPTY_STRING;
1376
1378
  }
1379
+ Logger.createDefaultLoggerOptions = function () {
1380
+ return {
1381
+ loggerCallback: function () {
1382
+ // allow users to not set loggerCallback
1383
+ },
1384
+ piiLoggingEnabled: false,
1385
+ logLevel: exports.LogLevel.Info
1386
+ };
1387
+ };
1377
1388
  /**
1378
1389
  * Create new Logger with existing configurations.
1379
1390
  */
@@ -1520,12 +1531,12 @@
1520
1531
  return Logger;
1521
1532
  }());
1522
1533
 
1523
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1534
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1524
1535
  /* eslint-disable header/header */
1525
1536
  var name$1 = "@azure/msal-common";
1526
- var version$1 = "9.0.1";
1537
+ var version$1 = "9.0.2";
1527
1538
 
1528
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1539
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1529
1540
  /*
1530
1541
  * Copyright (c) Microsoft Corporation. All rights reserved.
1531
1542
  * Licensed under the MIT License.
@@ -1546,7 +1557,7 @@
1546
1557
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1547
1558
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1548
1559
 
1549
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1560
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1550
1561
 
1551
1562
  /*
1552
1563
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1623,19 +1634,16 @@
1623
1634
  * @param key
1624
1635
  */
1625
1636
  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;
1637
+ var separator = Separators.CACHE_KEY_SEPARATOR;
1638
+ // Match host names like "login.microsoftonline.com", "https://accounts.google.com:4000", etc.
1639
+ var domainRe = "(https?:\\/\\/)?([\\w-]+\\.)*([\\w-]{1,63})(\\.(\\w{2,3}))(\\:[0-9]{4,5})?";
1640
+ for (var _i = 0, _a = Object.keys(CredentialType); _i < _a.length; _i++) {
1641
+ var credKey = _a[_i];
1642
+ var credVal = CredentialType[credKey].toLowerCase();
1643
+ // Verify credential type is preceded by a valid host name (environment)
1644
+ if (key.toLowerCase().search("(?<=" + separator + domainRe + ")" + separator + credVal + separator) !== -1) {
1645
+ return CredentialType[credKey];
1631
1646
  }
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
1647
  }
1640
1648
  return Constants.NOT_DEFINED;
1641
1649
  };
@@ -1705,7 +1713,7 @@
1705
1713
  return CredentialEntity;
1706
1714
  }());
1707
1715
 
1708
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1716
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1709
1717
 
1710
1718
  /*
1711
1719
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1960,7 +1968,7 @@
1960
1968
  return ClientConfigurationError;
1961
1969
  }(ClientAuthError));
1962
1970
 
1963
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1971
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
1964
1972
 
1965
1973
  /*
1966
1974
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2144,7 +2152,7 @@
2144
2152
  return ScopeSet;
2145
2153
  }());
2146
2154
 
2147
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2155
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2148
2156
 
2149
2157
  /*
2150
2158
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2182,7 +2190,7 @@
2182
2190
  };
2183
2191
  }
2184
2192
 
2185
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2193
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2186
2194
  /*
2187
2195
  * Copyright (c) Microsoft Corporation. All rights reserved.
2188
2196
  * Licensed under the MIT License.
@@ -2197,7 +2205,7 @@
2197
2205
  AuthorityType[AuthorityType["Dsts"] = 2] = "Dsts";
2198
2206
  })(AuthorityType || (AuthorityType = {}));
2199
2207
 
2200
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2208
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2201
2209
 
2202
2210
  /*
2203
2211
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2436,7 +2444,7 @@
2436
2444
  return AccountEntity;
2437
2445
  }());
2438
2446
 
2439
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2447
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2440
2448
 
2441
2449
  /*
2442
2450
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2488,7 +2496,7 @@
2488
2496
  return AuthToken;
2489
2497
  }());
2490
2498
 
2491
- /*! @azure/msal-common v9.0.1 2022-12-07 */
2499
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
2492
2500
 
2493
2501
  /*
2494
2502
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3367,7 +3375,7 @@
3367
3375
  return DefaultStorageClass;
3368
3376
  }(CacheManager));
3369
3377
 
3370
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3378
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3371
3379
 
3372
3380
  /*
3373
3381
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3461,7 +3469,7 @@
3461
3469
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3462
3470
  }
3463
3471
 
3464
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3472
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3465
3473
 
3466
3474
  /*
3467
3475
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3481,7 +3489,7 @@
3481
3489
  return ServerError;
3482
3490
  }(AuthError));
3483
3491
 
3484
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3492
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3485
3493
 
3486
3494
  /*
3487
3495
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3577,7 +3585,7 @@
3577
3585
  return ThrottlingUtils;
3578
3586
  }());
3579
3587
 
3580
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3588
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3581
3589
 
3582
3590
  /*
3583
3591
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3626,7 +3634,7 @@
3626
3634
  return NetworkManager;
3627
3635
  }());
3628
3636
 
3629
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3637
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3630
3638
  /*
3631
3639
  * Copyright (c) Microsoft Corporation. All rights reserved.
3632
3640
  * Licensed under the MIT License.
@@ -3637,7 +3645,7 @@
3637
3645
  CcsCredentialType["UPN"] = "UPN";
3638
3646
  })(CcsCredentialType || (CcsCredentialType = {}));
3639
3647
 
3640
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3648
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3641
3649
 
3642
3650
  /*
3643
3651
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3728,7 +3736,7 @@
3728
3736
  return BaseClient;
3729
3737
  }());
3730
3738
 
3731
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3739
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3732
3740
 
3733
3741
  /*
3734
3742
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3814,7 +3822,7 @@
3814
3822
  return RequestValidator;
3815
3823
  }());
3816
3824
 
3817
- /*! @azure/msal-common v9.0.1 2022-12-07 */
3825
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
3818
3826
 
3819
3827
  /*
3820
3828
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4192,7 +4200,7 @@
4192
4200
  return RequestParameterBuilder;
4193
4201
  }());
4194
4202
 
4195
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4203
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4196
4204
 
4197
4205
  /*
4198
4206
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4256,7 +4264,7 @@
4256
4264
  return IdTokenEntity;
4257
4265
  }(CredentialEntity));
4258
4266
 
4259
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4267
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4260
4268
  /*
4261
4269
  * Copyright (c) Microsoft Corporation. All rights reserved.
4262
4270
  * Licensed under the MIT License.
@@ -4306,7 +4314,7 @@
4306
4314
  return TimeUtils;
4307
4315
  }());
4308
4316
 
4309
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4317
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4310
4318
 
4311
4319
  /*
4312
4320
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4420,7 +4428,7 @@
4420
4428
  return AccessTokenEntity;
4421
4429
  }(CredentialEntity));
4422
4430
 
4423
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4431
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4424
4432
 
4425
4433
  /*
4426
4434
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4487,7 +4495,7 @@
4487
4495
  return RefreshTokenEntity;
4488
4496
  }(CredentialEntity));
4489
4497
 
4490
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4498
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4491
4499
 
4492
4500
  /*
4493
4501
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4562,7 +4570,7 @@
4562
4570
  return InteractionRequiredAuthError;
4563
4571
  }(AuthError));
4564
4572
 
4565
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4573
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4566
4574
  /*
4567
4575
  * Copyright (c) Microsoft Corporation. All rights reserved.
4568
4576
  * Licensed under the MIT License.
@@ -4578,7 +4586,7 @@
4578
4586
  return CacheRecord;
4579
4587
  }());
4580
4588
 
4581
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4589
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4582
4590
 
4583
4591
  /*
4584
4592
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4649,7 +4657,7 @@
4649
4657
  return ProtocolUtils;
4650
4658
  }());
4651
4659
 
4652
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4660
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4653
4661
 
4654
4662
  /*
4655
4663
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4883,7 +4891,7 @@
4883
4891
  return UrlString;
4884
4892
  }());
4885
4893
 
4886
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4894
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4887
4895
 
4888
4896
  /*
4889
4897
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4984,7 +4992,7 @@
4984
4992
  return PopTokenGenerator;
4985
4993
  }());
4986
4994
 
4987
- /*! @azure/msal-common v9.0.1 2022-12-07 */
4995
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
4988
4996
 
4989
4997
  /*
4990
4998
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5054,7 +5062,7 @@
5054
5062
  return AppMetadataEntity;
5055
5063
  }());
5056
5064
 
5057
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5065
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5058
5066
  /*
5059
5067
  * Copyright (c) Microsoft Corporation. All rights reserved.
5060
5068
  * Licensed under the MIT License.
@@ -5090,7 +5098,7 @@
5090
5098
  return TokenCacheContext;
5091
5099
  }());
5092
5100
 
5093
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5101
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5094
5102
 
5095
5103
  /*
5096
5104
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5361,7 +5369,7 @@
5361
5369
  cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,
5362
5370
  msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING,
5363
5371
  code: code,
5364
- fromNativeBroker: false
5372
+ fromNativeBroker: false,
5365
5373
  }];
5366
5374
  }
5367
5375
  });
@@ -5370,7 +5378,7 @@
5370
5378
  return ResponseHandler;
5371
5379
  }());
5372
5380
 
5373
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5381
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5374
5382
 
5375
5383
  /*
5376
5384
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5381,8 +5389,8 @@
5381
5389
  */
5382
5390
  var AuthorizationCodeClient = /** @class */ (function (_super) {
5383
5391
  __extends(AuthorizationCodeClient, _super);
5384
- function AuthorizationCodeClient(configuration) {
5385
- var _this = _super.call(this, configuration) || this;
5392
+ function AuthorizationCodeClient(configuration, performanceClient) {
5393
+ var _this = _super.call(this, configuration, performanceClient) || this;
5386
5394
  // Flag to indicate if client is for hybrid spa auth code redemption
5387
5395
  _this.includeRedirectUri = true;
5388
5396
  return _this;
@@ -5416,26 +5424,47 @@
5416
5424
  * @param request
5417
5425
  */
5418
5426
  AuthorizationCodeClient.prototype.acquireToken = function (request, authCodePayload) {
5419
- var _a;
5427
+ var _a, _b, _c;
5420
5428
  return __awaiter(this, void 0, void 0, function () {
5421
- var reqTimestamp, response, requestId, responseHandler;
5422
- return __generator(this, function (_b) {
5423
- switch (_b.label) {
5429
+ var atsMeasurement, reqTimestamp, response, requestId, httpVerAuthority, responseHandler;
5430
+ var _this = this;
5431
+ return __generator(this, function (_d) {
5432
+ switch (_d.label) {
5424
5433
  case 0:
5425
- this.logger.info("in acquireToken call");
5434
+ atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("AuthCodeClientAcquireToken", request.correlationId);
5435
+ this.logger.info("in acquireToken call in auth-code client");
5426
5436
  if (!request || StringUtils.isEmpty(request.code)) {
5427
5437
  throw ClientAuthError.createTokenRequestCannotBeMadeError();
5428
5438
  }
5429
5439
  reqTimestamp = TimeUtils.nowSeconds();
5430
5440
  return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
5431
5441
  case 1:
5432
- response = _b.sent();
5433
- requestId = (_a = response.headers) === null || _a === void 0 ? void 0 : _a[HeaderNames.X_MS_REQUEST_ID];
5442
+ response = _d.sent();
5443
+ requestId = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_REQUEST_ID];
5444
+ httpVerAuthority = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_HTTP_VERSION];
5445
+ if (httpVerAuthority) {
5446
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5447
+ httpVerAuthority: httpVerAuthority
5448
+ });
5449
+ }
5434
5450
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5435
5451
  // Validate response. This function throws a server error if an error is returned by the server.
5436
5452
  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()];
5453
+ return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId).then(function (result) {
5454
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5455
+ success: true
5456
+ });
5457
+ return result;
5458
+ })
5459
+ .catch(function (error) {
5460
+ _this.logger.verbose("Error in fetching token in ACC", request.correlationId);
5461
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5462
+ errorCode: error.errorCode,
5463
+ subErrorCode: error.subError,
5464
+ success: false
5465
+ });
5466
+ throw error;
5467
+ })];
5439
5468
  }
5440
5469
  });
5441
5470
  });
@@ -5823,7 +5852,7 @@
5823
5852
  return AuthorizationCodeClient;
5824
5853
  }(BaseClient));
5825
5854
 
5826
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5855
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5827
5856
  /*
5828
5857
  * Copyright (c) Microsoft Corporation. All rights reserved.
5829
5858
  * Licensed under the MIT License.
@@ -5934,6 +5963,11 @@
5934
5963
  * Time taken for acquiring cached refresh token
5935
5964
  */
5936
5965
  PerformanceEvents["RefreshTokenClientAcquireTokenWithCachedRefreshToken"] = "refreshTokenClientAcquireTokenWithCachedRefreshToken";
5966
+ PerformanceEvents["GetEndpointMetadataFromNetwork"] = "getEndpointMetadataFromNetwork";
5967
+ PerformanceEvents["GetCloudDiscoveryMetadataFromNetworkMeasurement"] = "getCloudDiscoveryMetadataFromNetworkMeasurement";
5968
+ PerformanceEvents["HandleRedirectPromiseMeasurement"] = "handleRedirectPromiseMeasurement";
5969
+ PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
5970
+ PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5937
5971
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5938
5972
  /**
5939
5973
  * State of the performance event.
@@ -5948,7 +5982,7 @@
5948
5982
  PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
5949
5983
  })(PerformanceEventStatus || (PerformanceEventStatus = {}));
5950
5984
 
5951
- /*! @azure/msal-common v9.0.1 2022-12-07 */
5985
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
5952
5986
 
5953
5987
  /*
5954
5988
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5963,23 +5997,29 @@
5963
5997
  return _super.call(this, configuration, performanceClient) || this;
5964
5998
  }
5965
5999
  RefreshTokenClient.prototype.acquireToken = function (request) {
5966
- var _a, _b, _c;
6000
+ var _a, _b, _c, _d;
5967
6001
  return __awaiter(this, void 0, void 0, function () {
5968
- var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
6002
+ var atsMeasurement, reqTimestamp, response, httpVerToken, requestId, responseHandler;
5969
6003
  var _this = this;
5970
- return __generator(this, function (_d) {
5971
- switch (_d.label) {
6004
+ return __generator(this, function (_e) {
6005
+ switch (_e.label) {
5972
6006
  case 0:
5973
6007
  atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
5974
6008
  this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
5975
6009
  reqTimestamp = TimeUtils.nowSeconds();
5976
6010
  return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
5977
6011
  case 1:
5978
- response = _d.sent();
6012
+ response = _e.sent();
6013
+ httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_HTTP_VERSION];
5979
6014
  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
6015
+ refreshTokenSize: ((_c = response.body.refresh_token) === null || _c === void 0 ? void 0 : _c.length) || 0,
5981
6016
  });
5982
- requestId = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_REQUEST_ID];
6017
+ if (httpVerToken) {
6018
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6019
+ httpVerToken: httpVerToken,
6020
+ });
6021
+ }
6022
+ requestId = (_d = response.headers) === null || _d === void 0 ? void 0 : _d[HeaderNames.X_MS_REQUEST_ID];
5983
6023
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5984
6024
  responseHandler.validateTokenResponse(response.body);
5985
6025
  return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
@@ -6213,7 +6253,7 @@
6213
6253
  return RefreshTokenClient;
6214
6254
  }(BaseClient));
6215
6255
 
6216
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6256
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6217
6257
 
6218
6258
  /*
6219
6259
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6337,7 +6377,7 @@
6337
6377
  return SilentFlowClient;
6338
6378
  }(BaseClient));
6339
6379
 
6340
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6380
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6341
6381
  /*
6342
6382
  * Copyright (c) Microsoft Corporation. All rights reserved.
6343
6383
  * Licensed under the MIT License.
@@ -6349,7 +6389,7 @@
6349
6389
  response.hasOwnProperty("jwks_uri"));
6350
6390
  }
6351
6391
 
6352
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6392
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6353
6393
  /*
6354
6394
  * Copyright (c) Microsoft Corporation. All rights reserved.
6355
6395
  * Licensed under the MIT License.
@@ -6358,7 +6398,7 @@
6358
6398
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6359
6399
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6360
6400
 
6361
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6401
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6362
6402
  /*
6363
6403
  * Copyright (c) Microsoft Corporation. All rights reserved.
6364
6404
  * Licensed under the MIT License.
@@ -6372,7 +6412,7 @@
6372
6412
  ProtocolMode["OIDC"] = "OIDC";
6373
6413
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6374
6414
 
6375
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6415
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6376
6416
 
6377
6417
  /*
6378
6418
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6449,7 +6489,7 @@
6449
6489
  return AuthorityMetadataEntity;
6450
6490
  }());
6451
6491
 
6452
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6492
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6453
6493
  /*
6454
6494
  * Copyright (c) Microsoft Corporation. All rights reserved.
6455
6495
  * Licensed under the MIT License.
@@ -6459,7 +6499,7 @@
6459
6499
  response.hasOwnProperty("metadata"));
6460
6500
  }
6461
6501
 
6462
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6502
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6463
6503
  /*
6464
6504
  * Copyright (c) Microsoft Corporation. All rights reserved.
6465
6505
  * Licensed under the MIT License.
@@ -6469,7 +6509,7 @@
6469
6509
  response.hasOwnProperty("error_description"));
6470
6510
  }
6471
6511
 
6472
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6512
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6473
6513
 
6474
6514
  /*
6475
6515
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6591,7 +6631,7 @@
6591
6631
  return RegionDiscovery;
6592
6632
  }());
6593
6633
 
6594
- /*! @azure/msal-common v9.0.1 2022-12-07 */
6634
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
6595
6635
 
6596
6636
  /*
6597
6637
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7313,7 +7353,7 @@
7313
7353
  return Authority;
7314
7354
  }());
7315
7355
 
7316
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7356
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7317
7357
 
7318
7358
  /*
7319
7359
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7374,7 +7414,7 @@
7374
7414
  return AuthorityFactory;
7375
7415
  }());
7376
7416
 
7377
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7417
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7378
7418
 
7379
7419
  /*
7380
7420
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7405,7 +7445,7 @@
7405
7445
  return ServerTelemetryEntity;
7406
7446
  }());
7407
7447
 
7408
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7448
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7409
7449
 
7410
7450
  /*
7411
7451
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7433,7 +7473,7 @@
7433
7473
  return ThrottlingEntity;
7434
7474
  }());
7435
7475
 
7436
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7476
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7437
7477
 
7438
7478
  /*
7439
7479
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7450,7 +7490,7 @@
7450
7490
  }
7451
7491
  };
7452
7492
 
7453
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7493
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7454
7494
 
7455
7495
  /*
7456
7496
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7495,7 +7535,7 @@
7495
7535
  return JoseHeaderError;
7496
7536
  }(AuthError));
7497
7537
 
7498
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7538
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7499
7539
 
7500
7540
  /*
7501
7541
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7535,7 +7575,7 @@
7535
7575
  return JoseHeader;
7536
7576
  }());
7537
7577
 
7538
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7578
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7539
7579
 
7540
7580
  /*
7541
7581
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7594,7 +7634,7 @@
7594
7634
  return AuthenticationHeaderParser;
7595
7635
  }());
7596
7636
 
7597
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7637
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7598
7638
 
7599
7639
  /*
7600
7640
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7756,7 +7796,7 @@
7756
7796
  return ServerTelemetryManager;
7757
7797
  }());
7758
7798
 
7759
- /*! @azure/msal-common v9.0.1 2022-12-07 */
7799
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
7760
7800
 
7761
7801
  /*
7762
7802
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7802,7 +7842,7 @@
7802
7842
  this.logger.info("PerformanceClient: No correlation id provided for " + measureName + ", generating", eventCorrelationId);
7803
7843
  }
7804
7844
  this.logger.trace("PerformanceClient: Performance measurement started for " + measureName, eventCorrelationId);
7805
- var performanceMeasurement = this.startPerformanceMeasuremeant(measureName, eventCorrelationId);
7845
+ var performanceMeasurement = this.startPerformanceMeasurement(measureName, eventCorrelationId);
7806
7846
  performanceMeasurement.startMeasurement();
7807
7847
  var inProgressEvent = {
7808
7848
  eventId: this.generateId(),
@@ -8051,7 +8091,7 @@
8051
8091
  return PerformanceClient;
8052
8092
  }());
8053
8093
 
8054
- /*! @azure/msal-common v9.0.1 2022-12-07 */
8094
+ /*! @azure/msal-common v9.0.2 2023-01-10 */
8055
8095
 
8056
8096
  /*
8057
8097
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8077,7 +8117,7 @@
8077
8117
  StubPerformanceClient.prototype.generateId = function () {
8078
8118
  return "callback-id";
8079
8119
  };
8080
- StubPerformanceClient.prototype.startPerformanceMeasuremeant = function () {
8120
+ StubPerformanceClient.prototype.startPerformanceMeasurement = function () {
8081
8121
  return new StubPerformanceMeasurement();
8082
8122
  };
8083
8123
  return StubPerformanceClient;
@@ -9323,17 +9363,17 @@
9323
9363
  var activeAccountValueFilters = this.getItem(activeAccountKeyFilters);
9324
9364
  if (!activeAccountValueFilters) {
9325
9365
  // 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");
9366
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");
9327
9367
  var activeAccountKeyLocal = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);
9328
9368
  var activeAccountValueLocal = this.getItem(activeAccountKeyLocal);
9329
9369
  if (!activeAccountValueLocal) {
9330
- this.logger.trace("No active account found");
9370
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9331
9371
  return null;
9332
9372
  }
9333
9373
  var activeAccount = this.getAccountInfoByFilter({ localAccountId: activeAccountValueLocal })[0] || null;
9334
9374
  if (activeAccount) {
9335
- this.logger.trace("Legacy active account cache schema found");
9336
- this.logger.trace("Adding active account filters cache schema");
9375
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found");
9376
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema");
9337
9377
  this.setActiveAccount(activeAccount);
9338
9378
  return activeAccount;
9339
9379
  }
@@ -9341,13 +9381,13 @@
9341
9381
  }
9342
9382
  var activeAccountValueObj = this.validateAndParseJson(activeAccountValueFilters);
9343
9383
  if (activeAccountValueObj) {
9344
- this.logger.trace("Active account filters schema found");
9384
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found");
9345
9385
  return this.getAccountInfoByFilter({
9346
9386
  homeAccountId: activeAccountValueObj.homeAccountId,
9347
9387
  localAccountId: activeAccountValueObj.localAccountId
9348
9388
  })[0] || null;
9349
9389
  }
9350
- this.logger.trace("No active account found");
9390
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
9351
9391
  return null;
9352
9392
  };
9353
9393
  /**
@@ -9378,6 +9418,7 @@
9378
9418
  */
9379
9419
  BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {
9380
9420
  var allAccounts = this.getAllAccounts();
9421
+ this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total " + allAccounts.length + " accounts found");
9381
9422
  return allAccounts.filter(function (accountObj) {
9382
9423
  if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {
9383
9424
  return false;
@@ -9940,7 +9981,7 @@
9940
9981
 
9941
9982
  /* eslint-disable header/header */
9942
9983
  var name = "@azure/msal-browser";
9943
- var version = "2.32.1";
9984
+ var version = "2.32.2";
9944
9985
 
9945
9986
  /*
9946
9987
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10644,7 +10685,7 @@
10644
10685
  */
10645
10686
  StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
10646
10687
  return __awaiter$1(this, void 0, void 0, function () {
10647
- var discoveredAuthority;
10688
+ var discoveredAuthority, logger;
10648
10689
  return __generator$1(this, function (_a) {
10649
10690
  switch (_a.label) {
10650
10691
  case 0:
@@ -10652,6 +10693,7 @@
10652
10693
  return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions)];
10653
10694
  case 1:
10654
10695
  discoveredAuthority = _a.sent();
10696
+ logger = this.config.system.loggerOptions;
10655
10697
  return [2 /*return*/, {
10656
10698
  authOptions: {
10657
10699
  clientId: this.config.auth.clientId,
@@ -10663,9 +10705,9 @@
10663
10705
  preventCorsPreflight: true
10664
10706
  },
10665
10707
  loggerOptions: {
10666
- loggerCallback: this.config.system.loggerOptions.loggerCallback,
10667
- piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,
10668
- logLevel: this.config.system.loggerOptions.logLevel,
10708
+ loggerCallback: logger.loggerCallback,
10709
+ piiLoggingEnabled: logger.piiLoggingEnabled,
10710
+ logLevel: logger.logLevel,
10669
10711
  correlationId: this.correlationId
10670
10712
  },
10671
10713
  cryptoInterface: this.browserCrypto,
@@ -10709,13 +10751,14 @@
10709
10751
  * @param requestCorrelationId
10710
10752
  */
10711
10753
  StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority, requestAzureCloudOptions) {
10754
+ var _a;
10712
10755
  return __awaiter$1(this, void 0, void 0, function () {
10713
10756
  var getAuthorityMeasurement, authorityOptions, userAuthority, builtAuthority;
10714
- return __generator$1(this, function (_a) {
10715
- switch (_a.label) {
10757
+ return __generator$1(this, function (_b) {
10758
+ switch (_b.label) {
10716
10759
  case 0:
10717
10760
  this.logger.verbose("getDiscoveredAuthority called", this.correlationId);
10718
- getAuthorityMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10761
+ getAuthorityMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
10719
10762
  authorityOptions = {
10720
10763
  protocolMode: this.config.auth.protocolMode,
10721
10764
  knownAuthorities: this.config.auth.knownAuthorities,
@@ -10729,7 +10772,7 @@
10729
10772
  return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
10730
10773
  .then(function (result) {
10731
10774
  getAuthorityMeasurement.endMeasurement({
10732
- success: true
10775
+ success: true,
10733
10776
  });
10734
10777
  return result;
10735
10778
  })
@@ -10741,7 +10784,7 @@
10741
10784
  });
10742
10785
  throw error;
10743
10786
  })];
10744
- case 1: return [2 /*return*/, _a.sent()];
10787
+ case 1: return [2 /*return*/, _b.sent()];
10745
10788
  }
10746
10789
  });
10747
10790
  });
@@ -12913,7 +12956,9 @@
12913
12956
  // Default logger options for browser
12914
12957
  var DEFAULT_LOGGER_OPTIONS = {
12915
12958
  // eslint-disable-next-line @typescript-eslint/no-empty-function
12916
- loggerCallback: function () { },
12959
+ loggerCallback: function () {
12960
+ // allow users to not set logger call back
12961
+ },
12917
12962
  logLevel: exports.LogLevel.Info,
12918
12963
  piiLoggingEnabled: false
12919
12964
  };
@@ -12924,6 +12969,7 @@
12924
12969
  useMsrCrypto: false,
12925
12970
  entropy: undefined
12926
12971
  } });
12972
+ var providedSystemOptions = __assign$1(__assign$1({}, userInputSystem), { loggerOptions: (userInputSystem === null || userInputSystem === void 0 ? void 0 : userInputSystem.loggerOptions) || DEFAULT_LOGGER_OPTIONS });
12927
12973
  var DEFAULT_TELEMETRY_OPTIONS = {
12928
12974
  application: {
12929
12975
  appName: Constants.EMPTY_STRING,
@@ -12933,7 +12979,7 @@
12933
12979
  var overlayedConfig = {
12934
12980
  auth: __assign$1(__assign$1({}, DEFAULT_AUTH_OPTIONS), userInputAuth),
12935
12981
  cache: __assign$1(__assign$1({}, DEFAULT_CACHE_OPTIONS), userInputCache),
12936
- system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), userInputSystem),
12982
+ system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), providedSystemOptions),
12937
12983
  telemetry: __assign$1(__assign$1({}, DEFAULT_TELEMETRY_OPTIONS), userInputTelemetry)
12938
12984
  };
12939
12985
  return overlayedConfig;
@@ -13424,27 +13470,6 @@
13424
13470
  return EventHandler;
13425
13471
  }());
13426
13472
 
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
13473
  /*
13449
13474
  * Copyright (c) Microsoft Corporation. All rights reserved.
13450
13475
  * Licensed under the MIT License.
@@ -14979,6 +15004,29 @@
14979
15004
  return CryptoOps;
14980
15005
  }());
14981
15006
 
15007
+ /*
15008
+ * Copyright (c) Microsoft Corporation. All rights reserved.
15009
+ * Licensed under the MIT License.
15010
+ */
15011
+
15012
+ var internals = /*#__PURE__*/Object.freeze({
15013
+ __proto__: null,
15014
+ BrowserCacheManager: BrowserCacheManager,
15015
+ StandardInteractionClient: StandardInteractionClient,
15016
+ RedirectClient: RedirectClient,
15017
+ PopupClient: PopupClient,
15018
+ SilentIframeClient: SilentIframeClient,
15019
+ SilentCacheClient: SilentCacheClient,
15020
+ SilentRefreshClient: SilentRefreshClient,
15021
+ RedirectHandler: RedirectHandler,
15022
+ EventHandler: EventHandler,
15023
+ NativeMessageHandler: NativeMessageHandler,
15024
+ BrowserConstants: BrowserConstants,
15025
+ get TemporaryCacheKeys () { return TemporaryCacheKeys; },
15026
+ CryptoOps: CryptoOps,
15027
+ NativeAuthError: NativeAuthError
15028
+ });
15029
+
14982
15030
  /*
14983
15031
  * Copyright (c) Microsoft Corporation. All rights reserved.
14984
15032
  * Licensed under the MIT License.
@@ -15358,7 +15406,7 @@
15358
15406
  _this.guidGenerator = new GuidGenerator(_this.browserCrypto);
15359
15407
  return _this;
15360
15408
  }
15361
- BrowserPerformanceClient.prototype.startPerformanceMeasuremeant = function (measureName, correlationId) {
15409
+ BrowserPerformanceClient.prototype.startPerformanceMeasurement = function (measureName, correlationId) {
15362
15410
  return new BrowserPerformanceMeasurement(measureName, correlationId);
15363
15411
  };
15364
15412
  BrowserPerformanceClient.prototype.generateId = function () {
@@ -16463,7 +16511,8 @@
16463
16511
  success: true,
16464
16512
  fromCache: result.fromCache,
16465
16513
  isNativeBroker: result.fromNativeBroker,
16466
- requestId: result.requestId
16514
+ cacheLookupPolicy: request.cacheLookupPolicy,
16515
+ requestId: result.requestId,
16467
16516
  });
16468
16517
  atsMeasurement.flushMeasurement();
16469
16518
  return result;
@@ -16501,13 +16550,13 @@
16501
16550
  */
16502
16551
  PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
16503
16552
  return __awaiter$1(this, void 0, void 0, function () {
16504
- var astsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16553
+ var atsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
16505
16554
  var _this = this;
16506
16555
  return __generator$1(this, function (_a) {
16507
16556
  switch (_a.label) {
16508
16557
  case 0:
16509
16558
  this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
16510
- astsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16559
+ atsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
16511
16560
  if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
16512
16561
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
16513
16562
  silentRequest = __assign$1(__assign$1({}, request), { account: account });
@@ -16560,7 +16609,7 @@
16560
16609
  _a.label = 3;
16561
16610
  case 3: return [2 /*return*/, result.then(function (response) {
16562
16611
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
16563
- astsAsyncMeasurement.endMeasurement({
16612
+ atsAsyncMeasurement.endMeasurement({
16564
16613
  success: true,
16565
16614
  fromCache: response.fromCache,
16566
16615
  isNativeBroker: response.fromNativeBroker,
@@ -16569,7 +16618,7 @@
16569
16618
  return response;
16570
16619
  }).catch(function (tokenRenewalError) {
16571
16620
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
16572
- astsAsyncMeasurement.endMeasurement({
16621
+ atsAsyncMeasurement.endMeasurement({
16573
16622
  errorCode: tokenRenewalError.errorCode,
16574
16623
  subErrorCode: tokenRenewalError.subError,
16575
16624
  success: false