@azure/msal-browser 2.37.1 → 2.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +213 -213
  3. package/dist/_virtual/_tslib.js +1 -1
  4. package/dist/app/ClientApplication.d.ts.map +1 -1
  5. package/dist/app/ClientApplication.js +3 -2
  6. package/dist/app/ClientApplication.js.map +1 -1
  7. package/dist/app/IPublicClientApplication.js +1 -1
  8. package/dist/app/IPublicClientApplication.js.map +1 -1
  9. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  10. package/dist/app/PublicClientApplication.js +5 -3
  11. package/dist/app/PublicClientApplication.js.map +1 -1
  12. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  13. package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
  14. package/dist/cache/AsyncMemoryStorage.js +1 -1
  15. package/dist/cache/AsyncMemoryStorage.js.map +1 -1
  16. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  17. package/dist/cache/BrowserCacheManager.js +3 -2
  18. package/dist/cache/BrowserCacheManager.js.map +1 -1
  19. package/dist/cache/BrowserStorage.js +1 -1
  20. package/dist/cache/BrowserStorage.js.map +1 -1
  21. package/dist/cache/CryptoKeyStore.js +1 -1
  22. package/dist/cache/CryptoKeyStore.js.map +1 -1
  23. package/dist/cache/DatabaseStorage.js +1 -1
  24. package/dist/cache/DatabaseStorage.js.map +1 -1
  25. package/dist/cache/MemoryStorage.js +1 -1
  26. package/dist/cache/MemoryStorage.js.map +1 -1
  27. package/dist/cache/TokenCache.js +1 -1
  28. package/dist/cache/TokenCache.js.map +1 -1
  29. package/dist/config/Configuration.d.ts +4 -0
  30. package/dist/config/Configuration.d.ts.map +1 -1
  31. package/dist/config/Configuration.js +3 -2
  32. package/dist/config/Configuration.js.map +1 -1
  33. package/dist/crypto/BrowserCrypto.js +1 -1
  34. package/dist/crypto/BrowserCrypto.js.map +1 -1
  35. package/dist/crypto/CryptoOps.js +1 -1
  36. package/dist/crypto/CryptoOps.js.map +1 -1
  37. package/dist/crypto/GuidGenerator.js +1 -1
  38. package/dist/crypto/GuidGenerator.js.map +1 -1
  39. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  40. package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
  41. package/dist/crypto/MsBrowserCrypto.js +1 -1
  42. package/dist/crypto/MsBrowserCrypto.js.map +1 -1
  43. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  44. package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
  45. package/dist/crypto/PkceGenerator.js +1 -1
  46. package/dist/crypto/PkceGenerator.js.map +1 -1
  47. package/dist/crypto/SignedHttpRequest.js +1 -1
  48. package/dist/crypto/SignedHttpRequest.js.map +1 -1
  49. package/dist/encode/Base64Decode.js +1 -1
  50. package/dist/encode/Base64Decode.js.map +1 -1
  51. package/dist/encode/Base64Encode.js +1 -1
  52. package/dist/encode/Base64Encode.js.map +1 -1
  53. package/dist/error/BrowserAuthError.js +1 -1
  54. package/dist/error/BrowserAuthError.js.map +1 -1
  55. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  56. package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
  57. package/dist/error/NativeAuthError.js +1 -1
  58. package/dist/error/NativeAuthError.js.map +1 -1
  59. package/dist/event/EventHandler.js +1 -1
  60. package/dist/event/EventHandler.js.map +1 -1
  61. package/dist/event/EventMessage.js +1 -1
  62. package/dist/event/EventMessage.js.map +1 -1
  63. package/dist/event/EventType.js +1 -1
  64. package/dist/event/EventType.js.map +1 -1
  65. package/dist/index.cjs.js +116 -104
  66. package/dist/index.cjs.js.map +1 -1
  67. package/dist/index.js +1 -1
  68. package/dist/interaction_client/BaseInteractionClient.js +2 -2
  69. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  70. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  71. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
  72. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  73. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  74. package/dist/interaction_client/PopupClient.js +1 -1
  75. package/dist/interaction_client/PopupClient.js.map +1 -1
  76. package/dist/interaction_client/RedirectClient.js +1 -1
  77. package/dist/interaction_client/RedirectClient.js.map +1 -1
  78. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  79. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  80. package/dist/interaction_client/SilentCacheClient.js +1 -1
  81. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  82. package/dist/interaction_client/SilentIframeClient.js +1 -1
  83. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  84. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  85. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  86. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  87. package/dist/interaction_client/StandardInteractionClient.js +4 -1
  88. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  89. package/dist/interaction_handler/InteractionHandler.js +1 -1
  90. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  91. package/dist/interaction_handler/RedirectHandler.js +1 -1
  92. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  93. package/dist/interaction_handler/SilentHandler.js +1 -1
  94. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  95. package/dist/internals.js +1 -1
  96. package/dist/internals.js.map +1 -1
  97. package/dist/navigation/NavigationClient.js +1 -1
  98. package/dist/navigation/NavigationClient.js.map +1 -1
  99. package/dist/network/FetchClient.js +1 -1
  100. package/dist/network/FetchClient.js.map +1 -1
  101. package/dist/network/XhrClient.js +1 -1
  102. package/dist/network/XhrClient.js.map +1 -1
  103. package/dist/packageMetadata.d.ts +1 -1
  104. package/dist/packageMetadata.js +2 -2
  105. package/dist/packageMetadata.js.map +1 -1
  106. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  107. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  108. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  109. package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
  110. package/dist/utils/BrowserConstants.js +1 -1
  111. package/dist/utils/BrowserConstants.js.map +1 -1
  112. package/dist/utils/BrowserProtocolUtils.js +1 -1
  113. package/dist/utils/BrowserProtocolUtils.js.map +1 -1
  114. package/dist/utils/BrowserStringUtils.js +1 -1
  115. package/dist/utils/BrowserStringUtils.js.map +1 -1
  116. package/dist/utils/BrowserUtils.js +1 -1
  117. package/dist/utils/BrowserUtils.js.map +1 -1
  118. package/dist/utils/MathUtils.js +1 -1
  119. package/dist/utils/MathUtils.js.map +1 -1
  120. package/lib/msal-browser.js +116 -104
  121. package/lib/msal-browser.js.map +1 -1
  122. package/lib/msal-browser.min.js +39 -39
  123. package/package.json +95 -95
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.37.1 2023-06-07 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
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 v13.1.0 2023-06-07 */
120
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
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 v13.1.0 2023-06-07 */
207
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
208
208
 
209
209
  /*
210
210
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -568,6 +568,7 @@ var CacheOutcome;
568
568
  CacheOutcome["NO_CACHED_ACCESS_TOKEN"] = "2";
569
569
  CacheOutcome["CACHED_ACCESS_TOKEN_EXPIRED"] = "3";
570
570
  CacheOutcome["REFRESH_CACHED_ACCESS_TOKEN"] = "4";
571
+ CacheOutcome["CLAIMS_REQUESTED_CACHE_SKIPPED"] = "5";
571
572
  })(CacheOutcome || (CacheOutcome = {}));
572
573
  var JsonTypes;
573
574
  (function (JsonTypes) {
@@ -576,7 +577,7 @@ var JsonTypes;
576
577
  JsonTypes["Pop"] = "pop";
577
578
  })(JsonTypes || (JsonTypes = {}));
578
579
 
579
- /*! @azure/msal-common v13.1.0 2023-06-07 */
580
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
580
581
 
581
582
  /*
582
583
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -632,7 +633,7 @@ var AuthError = /** @class */ (function (_super) {
632
633
  return AuthError;
633
634
  }(Error));
634
635
 
635
- /*! @azure/msal-common v13.1.0 2023-06-07 */
636
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
636
637
 
637
638
  /*
638
639
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -707,7 +708,7 @@ var DEFAULT_CRYPTO_IMPLEMENTATION = {
707
708
  }
708
709
  };
709
710
 
710
- /*! @azure/msal-common v13.1.0 2023-06-07 */
711
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
711
712
 
712
713
  /*
713
714
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1222,7 +1223,7 @@ var ClientAuthError = /** @class */ (function (_super) {
1222
1223
  return ClientAuthError;
1223
1224
  }(AuthError));
1224
1225
 
1225
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1226
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1226
1227
 
1227
1228
  /*
1228
1229
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1347,7 +1348,7 @@ var StringUtils = /** @class */ (function () {
1347
1348
  return StringUtils;
1348
1349
  }());
1349
1350
 
1350
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1351
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1351
1352
 
1352
1353
  /*
1353
1354
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1537,12 +1538,12 @@ var Logger = /** @class */ (function () {
1537
1538
  return Logger;
1538
1539
  }());
1539
1540
 
1540
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1541
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1541
1542
  /* eslint-disable header/header */
1542
1543
  var name$1 = "@azure/msal-common";
1543
- var version$1 = "13.1.0";
1544
+ var version$1 = "13.2.1";
1544
1545
 
1545
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1546
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1546
1547
  /*
1547
1548
  * Copyright (c) Microsoft Corporation. All rights reserved.
1548
1549
  * Licensed under the MIT License.
@@ -1563,7 +1564,7 @@ exports.AzureCloudInstance = void 0;
1563
1564
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1564
1565
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1565
1566
 
1566
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1567
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1567
1568
 
1568
1569
  /*
1569
1570
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1828,7 +1829,7 @@ var ClientConfigurationError = /** @class */ (function (_super) {
1828
1829
  return ClientConfigurationError;
1829
1830
  }(ClientAuthError));
1830
1831
 
1831
- /*! @azure/msal-common v13.1.0 2023-06-07 */
1832
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
1832
1833
 
1833
1834
  /*
1834
1835
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2027,7 +2028,7 @@ var ScopeSet = /** @class */ (function () {
2027
2028
  return ScopeSet;
2028
2029
  }());
2029
2030
 
2030
- /*! @azure/msal-common v13.1.0 2023-06-07 */
2031
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
2031
2032
 
2032
2033
  /*
2033
2034
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2065,7 +2066,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2065
2066
  };
2066
2067
  }
2067
2068
 
2068
- /*! @azure/msal-common v13.1.0 2023-06-07 */
2069
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
2069
2070
  /*
2070
2071
  * Copyright (c) Microsoft Corporation. All rights reserved.
2071
2072
  * Licensed under the MIT License.
@@ -2081,7 +2082,7 @@ var AuthorityType;
2081
2082
  AuthorityType[AuthorityType["Ciam"] = 3] = "Ciam";
2082
2083
  })(AuthorityType || (AuthorityType = {}));
2083
2084
 
2084
- /*! @azure/msal-common v13.1.0 2023-06-07 */
2085
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
2085
2086
 
2086
2087
  /*
2087
2088
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2320,7 +2321,7 @@ var AccountEntity = /** @class */ (function () {
2320
2321
  return AccountEntity;
2321
2322
  }());
2322
2323
 
2323
- /*! @azure/msal-common v13.1.0 2023-06-07 */
2324
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
2324
2325
 
2325
2326
  /*
2326
2327
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2372,7 +2373,7 @@ var AuthToken = /** @class */ (function () {
2372
2373
  return AuthToken;
2373
2374
  }());
2374
2375
 
2375
- /*! @azure/msal-common v13.1.0 2023-06-07 */
2376
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
2376
2377
 
2377
2378
  /*
2378
2379
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3420,7 +3421,7 @@ var DefaultStorageClass = /** @class */ (function (_super) {
3420
3421
  return DefaultStorageClass;
3421
3422
  }(CacheManager));
3422
3423
 
3423
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3424
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3424
3425
 
3425
3426
  /*
3426
3427
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3440,6 +3441,9 @@ var DEFAULT_LOGGER_IMPLEMENTATION = {
3440
3441
  logLevel: exports.LogLevel.Info,
3441
3442
  correlationId: Constants.EMPTY_STRING
3442
3443
  };
3444
+ var DEFAULT_CACHE_OPTIONS = {
3445
+ claimsBasedCachingEnabled: true
3446
+ };
3443
3447
  var DEFAULT_NETWORK_IMPLEMENTATION = {
3444
3448
  sendGetRequestAsync: function () {
3445
3449
  return __awaiter(this, void 0, void 0, function () {
@@ -3488,12 +3492,13 @@ var DEFAULT_TELEMETRY_OPTIONS = {
3488
3492
  * @returns Configuration
3489
3493
  */
3490
3494
  function buildClientConfiguration(_a) {
3491
- var userAuthOptions = _a.authOptions, userSystemOptions = _a.systemOptions, userLoggerOption = _a.loggerOptions, storageImplementation = _a.storageInterface, networkImplementation = _a.networkInterface, cryptoImplementation = _a.cryptoInterface, clientCredentials = _a.clientCredentials, libraryInfo = _a.libraryInfo, telemetry = _a.telemetry, serverTelemetryManager = _a.serverTelemetryManager, persistencePlugin = _a.persistencePlugin, serializableCache = _a.serializableCache;
3495
+ var userAuthOptions = _a.authOptions, userSystemOptions = _a.systemOptions, userLoggerOption = _a.loggerOptions, userCacheOptions = _a.cacheOptions, storageImplementation = _a.storageInterface, networkImplementation = _a.networkInterface, cryptoImplementation = _a.cryptoInterface, clientCredentials = _a.clientCredentials, libraryInfo = _a.libraryInfo, telemetry = _a.telemetry, serverTelemetryManager = _a.serverTelemetryManager, persistencePlugin = _a.persistencePlugin, serializableCache = _a.serializableCache;
3492
3496
  var loggerOptions = __assign(__assign({}, DEFAULT_LOGGER_IMPLEMENTATION), userLoggerOption);
3493
3497
  return {
3494
3498
  authOptions: buildAuthOptions(userAuthOptions),
3495
3499
  systemOptions: __assign(__assign({}, DEFAULT_SYSTEM_OPTIONS), userSystemOptions),
3496
3500
  loggerOptions: loggerOptions,
3501
+ cacheOptions: __assign(__assign({}, DEFAULT_CACHE_OPTIONS), userCacheOptions),
3497
3502
  storageInterface: storageImplementation || new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),
3498
3503
  networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
3499
3504
  cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
@@ -3513,7 +3518,7 @@ function buildAuthOptions(authOptions) {
3513
3518
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3514
3519
  }
3515
3520
 
3516
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3521
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3517
3522
 
3518
3523
  /*
3519
3524
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3533,7 +3538,7 @@ var ServerError = /** @class */ (function (_super) {
3533
3538
  return ServerError;
3534
3539
  }(AuthError));
3535
3540
 
3536
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3541
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3537
3542
 
3538
3543
  /*
3539
3544
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3629,7 +3634,7 @@ var ThrottlingUtils = /** @class */ (function () {
3629
3634
  return ThrottlingUtils;
3630
3635
  }());
3631
3636
 
3632
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3637
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3633
3638
 
3634
3639
  /*
3635
3640
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3678,7 +3683,7 @@ var NetworkManager = /** @class */ (function () {
3678
3683
  return NetworkManager;
3679
3684
  }());
3680
3685
 
3681
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3686
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3682
3687
  /*
3683
3688
  * Copyright (c) Microsoft Corporation. All rights reserved.
3684
3689
  * Licensed under the MIT License.
@@ -3689,7 +3694,7 @@ var CcsCredentialType;
3689
3694
  CcsCredentialType["UPN"] = "UPN";
3690
3695
  })(CcsCredentialType || (CcsCredentialType = {}));
3691
3696
 
3692
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3697
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3693
3698
 
3694
3699
  /*
3695
3700
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3780,7 +3785,7 @@ var RequestValidator = /** @class */ (function () {
3780
3785
  return RequestValidator;
3781
3786
  }());
3782
3787
 
3783
- /*! @azure/msal-common v13.1.0 2023-06-07 */
3788
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
3784
3789
 
3785
3790
  /*
3786
3791
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4158,7 +4163,7 @@ var RequestParameterBuilder = /** @class */ (function () {
4158
4163
  return RequestParameterBuilder;
4159
4164
  }());
4160
4165
 
4161
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4166
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4162
4167
 
4163
4168
  /*
4164
4169
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4260,7 +4265,7 @@ var BaseClient = /** @class */ (function () {
4260
4265
  return BaseClient;
4261
4266
  }());
4262
4267
 
4263
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4268
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4264
4269
 
4265
4270
  /*
4266
4271
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4398,7 +4403,7 @@ var CredentialEntity = /** @class */ (function () {
4398
4403
  return CredentialEntity;
4399
4404
  }());
4400
4405
 
4401
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4406
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4402
4407
 
4403
4408
  /*
4404
4409
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4462,7 +4467,7 @@ var IdTokenEntity = /** @class */ (function (_super) {
4462
4467
  return IdTokenEntity;
4463
4468
  }(CredentialEntity));
4464
4469
 
4465
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4470
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4466
4471
  /*
4467
4472
  * Copyright (c) Microsoft Corporation. All rights reserved.
4468
4473
  * Licensed under the MIT License.
@@ -4512,7 +4517,7 @@ var TimeUtils = /** @class */ (function () {
4512
4517
  return TimeUtils;
4513
4518
  }());
4514
4519
 
4515
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4520
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4516
4521
 
4517
4522
  /*
4518
4523
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4626,7 +4631,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4626
4631
  return AccessTokenEntity;
4627
4632
  }(CredentialEntity));
4628
4633
 
4629
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4634
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4630
4635
 
4631
4636
  /*
4632
4637
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4693,7 +4698,7 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
4693
4698
  return RefreshTokenEntity;
4694
4699
  }(CredentialEntity));
4695
4700
 
4696
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4701
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4697
4702
 
4698
4703
  /*
4699
4704
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4772,7 +4777,7 @@ var InteractionRequiredAuthError = /** @class */ (function (_super) {
4772
4777
  return InteractionRequiredAuthError;
4773
4778
  }(AuthError));
4774
4779
 
4775
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4780
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4776
4781
  /*
4777
4782
  * Copyright (c) Microsoft Corporation. All rights reserved.
4778
4783
  * Licensed under the MIT License.
@@ -4788,7 +4793,7 @@ var CacheRecord = /** @class */ (function () {
4788
4793
  return CacheRecord;
4789
4794
  }());
4790
4795
 
4791
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4796
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4792
4797
 
4793
4798
  /*
4794
4799
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4859,7 +4864,7 @@ var ProtocolUtils = /** @class */ (function () {
4859
4864
  return ProtocolUtils;
4860
4865
  }());
4861
4866
 
4862
- /*! @azure/msal-common v13.1.0 2023-06-07 */
4867
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
4863
4868
 
4864
4869
  /*
4865
4870
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5093,7 +5098,7 @@ var UrlString = /** @class */ (function () {
5093
5098
  return UrlString;
5094
5099
  }());
5095
5100
 
5096
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5101
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5097
5102
  /*
5098
5103
  * Copyright (c) Microsoft Corporation. All rights reserved.
5099
5104
  * Licensed under the MIT License.
@@ -5322,7 +5327,7 @@ var IntFields = new Set([
5322
5327
  "status",
5323
5328
  ]);
5324
5329
 
5325
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5330
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5326
5331
 
5327
5332
  /*
5328
5333
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5431,7 +5436,7 @@ var PopTokenGenerator = /** @class */ (function () {
5431
5436
  return PopTokenGenerator;
5432
5437
  }());
5433
5438
 
5434
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5439
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5435
5440
 
5436
5441
  /*
5437
5442
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5501,7 +5506,7 @@ var AppMetadataEntity = /** @class */ (function () {
5501
5506
  return AppMetadataEntity;
5502
5507
  }());
5503
5508
 
5504
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5509
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5505
5510
  /*
5506
5511
  * Copyright (c) Microsoft Corporation. All rights reserved.
5507
5512
  * Licensed under the MIT License.
@@ -5537,7 +5542,7 @@ var AppMetadataEntity = /** @class */ (function () {
5537
5542
  return TokenCacheContext;
5538
5543
  }());
5539
5544
 
5540
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5545
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5541
5546
 
5542
5547
  /*
5543
5548
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5824,7 +5829,7 @@ var ResponseHandler = /** @class */ (function () {
5824
5829
  return ResponseHandler;
5825
5830
  }());
5826
5831
 
5827
- /*! @azure/msal-common v13.1.0 2023-06-07 */
5832
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
5828
5833
 
5829
5834
  /*
5830
5835
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6302,7 +6307,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
6302
6307
  return AuthorizationCodeClient;
6303
6308
  }(BaseClient));
6304
6309
 
6305
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6310
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6306
6311
 
6307
6312
  /*
6308
6313
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6576,7 +6581,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
6576
6581
  return RefreshTokenClient;
6577
6582
  }(BaseClient));
6578
6583
 
6579
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6584
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6580
6585
 
6581
6586
  /*
6582
6587
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6620,11 +6625,11 @@ var SilentFlowClient = /** @class */ (function (_super) {
6620
6625
  * @param request
6621
6626
  */
6622
6627
  SilentFlowClient.prototype.acquireCachedToken = function (request) {
6623
- var _a, _b, _c, _d;
6628
+ var _a, _b, _c, _d, _e;
6624
6629
  return __awaiter(this, void 0, void 0, function () {
6625
6630
  var environment, cacheRecord;
6626
- return __generator(this, function (_e) {
6627
- switch (_e.label) {
6631
+ return __generator(this, function (_f) {
6632
+ switch (_f.label) {
6628
6633
  case 0:
6629
6634
  // Cannot renew token if no request object is given.
6630
6635
  if (!request) {
@@ -6636,6 +6641,12 @@ var SilentFlowClient = /** @class */ (function (_super) {
6636
6641
  this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because forceRefresh is true.");
6637
6642
  throw ClientAuthError.createRefreshRequiredError();
6638
6643
  }
6644
+ else if (!this.config.cacheOptions.claimsBasedCachingEnabled && !StringUtils.isEmptyObj(request.claims)) {
6645
+ // Must refresh due to presence of claims in request preventing cache lookup
6646
+ (_b = this.serverTelemetryManager) === null || _b === void 0 ? void 0 : _b.setCacheOutcome(CacheOutcome.CLAIMS_REQUESTED_CACHE_SKIPPED);
6647
+ this.logger.info("SilentFlowClient:acquireCachedToken - Skipping cache because claims-based caching is disabled and claims were requested.");
6648
+ throw ClientAuthError.createRefreshRequiredError();
6649
+ }
6639
6650
  // We currently do not support silent flow for account === null use cases; This will be revisited for confidential flow usecases
6640
6651
  if (!request.account) {
6641
6652
  throw ClientAuthError.createNoAccountInSilentRequestError();
@@ -6644,20 +6655,20 @@ var SilentFlowClient = /** @class */ (function (_super) {
6644
6655
  cacheRecord = this.cacheManager.readCacheRecord(request.account, request, environment);
6645
6656
  if (!cacheRecord.accessToken) {
6646
6657
  // Must refresh due to non-existent access_token.
6647
- (_b = this.serverTelemetryManager) === null || _b === void 0 ? void 0 : _b.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN);
6658
+ (_c = this.serverTelemetryManager) === null || _c === void 0 ? void 0 : _c.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN);
6648
6659
  this.logger.info("SilentFlowClient:acquireCachedToken - No access token found in cache for the given properties.");
6649
6660
  throw ClientAuthError.createRefreshRequiredError();
6650
6661
  }
6651
6662
  else if (TimeUtils.wasClockTurnedBack(cacheRecord.accessToken.cachedAt) ||
6652
6663
  TimeUtils.isTokenExpired(cacheRecord.accessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
6653
6664
  // Must refresh due to expired access_token.
6654
- (_c = this.serverTelemetryManager) === null || _c === void 0 ? void 0 : _c.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);
6665
+ (_d = this.serverTelemetryManager) === null || _d === void 0 ? void 0 : _d.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED);
6655
6666
  this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token is expired or will expire within " + this.config.systemOptions.tokenRenewalOffsetSeconds + " seconds.");
6656
6667
  throw ClientAuthError.createRefreshRequiredError();
6657
6668
  }
6658
6669
  else if (cacheRecord.accessToken.refreshOn && TimeUtils.isTokenExpired(cacheRecord.accessToken.refreshOn, 0)) {
6659
6670
  // Must refresh due to the refresh_in value.
6660
- (_d = this.serverTelemetryManager) === null || _d === void 0 ? void 0 : _d.setCacheOutcome(CacheOutcome.REFRESH_CACHED_ACCESS_TOKEN);
6671
+ (_e = this.serverTelemetryManager) === null || _e === void 0 ? void 0 : _e.setCacheOutcome(CacheOutcome.REFRESH_CACHED_ACCESS_TOKEN);
6661
6672
  this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'.");
6662
6673
  throw ClientAuthError.createRefreshRequiredError();
6663
6674
  }
@@ -6665,7 +6676,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
6665
6676
  this.config.serverTelemetryManager.incrementCacheHits();
6666
6677
  }
6667
6678
  return [4 /*yield*/, this.generateResultFromCacheRecord(cacheRecord, request)];
6668
- case 1: return [2 /*return*/, _e.sent()];
6679
+ case 1: return [2 /*return*/, _f.sent()];
6669
6680
  }
6670
6681
  });
6671
6682
  });
@@ -6700,7 +6711,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
6700
6711
  return SilentFlowClient;
6701
6712
  }(BaseClient));
6702
6713
 
6703
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6714
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6704
6715
  /*
6705
6716
  * Copyright (c) Microsoft Corporation. All rights reserved.
6706
6717
  * Licensed under the MIT License.
@@ -6712,7 +6723,7 @@ function isOpenIdConfigResponse(response) {
6712
6723
  response.hasOwnProperty("jwks_uri"));
6713
6724
  }
6714
6725
 
6715
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6726
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6716
6727
  /*
6717
6728
  * Copyright (c) Microsoft Corporation. All rights reserved.
6718
6729
  * Licensed under the MIT License.
@@ -6721,7 +6732,7 @@ var rawMetdataJSON = { "endpointMetadata": { "https://login.microsoftonline.com/
6721
6732
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6722
6733
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6723
6734
 
6724
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6735
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6725
6736
  /*
6726
6737
  * Copyright (c) Microsoft Corporation. All rights reserved.
6727
6738
  * Licensed under the MIT License.
@@ -6735,7 +6746,7 @@ exports.ProtocolMode = void 0;
6735
6746
  ProtocolMode["OIDC"] = "OIDC";
6736
6747
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6737
6748
 
6738
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6749
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6739
6750
 
6740
6751
  /*
6741
6752
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6812,7 +6823,7 @@ var AuthorityMetadataEntity = /** @class */ (function () {
6812
6823
  return AuthorityMetadataEntity;
6813
6824
  }());
6814
6825
 
6815
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6826
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6816
6827
  /*
6817
6828
  * Copyright (c) Microsoft Corporation. All rights reserved.
6818
6829
  * Licensed under the MIT License.
@@ -6822,7 +6833,7 @@ function isCloudInstanceDiscoveryResponse(response) {
6822
6833
  response.hasOwnProperty("metadata"));
6823
6834
  }
6824
6835
 
6825
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6836
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6826
6837
  /*
6827
6838
  * Copyright (c) Microsoft Corporation. All rights reserved.
6828
6839
  * Licensed under the MIT License.
@@ -6832,7 +6843,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
6832
6843
  response.hasOwnProperty("error_description"));
6833
6844
  }
6834
6845
 
6835
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6846
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6836
6847
 
6837
6848
  /*
6838
6849
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6964,7 +6975,7 @@ var RegionDiscovery = /** @class */ (function () {
6964
6975
  return RegionDiscovery;
6965
6976
  }());
6966
6977
 
6967
- /*! @azure/msal-common v13.1.0 2023-06-07 */
6978
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
6968
6979
 
6969
6980
  /*
6970
6981
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7405,42 +7416,35 @@ var Authority = /** @class */ (function () {
7405
7416
  };
7406
7417
  /**
7407
7418
  * Update the retrieved metadata with regional information.
7419
+ * User selected Azure region will be used if configured.
7408
7420
  */
7409
7421
  Authority.prototype.updateMetadataWithRegionalInformation = function (metadata) {
7410
- var _a, _b, _c, _d, _e, _f, _g;
7422
+ var _a, _b, _c, _d;
7411
7423
  return __awaiter(this, void 0, void 0, function () {
7412
- var autodetectedRegionName, azureRegion;
7413
- return __generator(this, function (_h) {
7414
- switch (_h.label) {
7424
+ var userConfiguredAzureRegion, autodetectedRegionName;
7425
+ return __generator(this, function (_e) {
7426
+ switch (_e.label) {
7415
7427
  case 0:
7416
7428
  (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.addQueueMeasurement(exports.PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, this.correlationId);
7417
- (_b = this.performanceClient) === null || _b === void 0 ? void 0 : _b.setPreQueueTime(exports.PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId);
7418
- return [4 /*yield*/, this.regionDiscovery.detectRegion((_c = this.authorityOptions.azureRegionConfiguration) === null || _c === void 0 ? void 0 : _c.environmentRegion, this.regionDiscoveryMetadata)];
7419
- case 1:
7420
- autodetectedRegionName = _h.sent();
7421
- azureRegion = ((_d = this.authorityOptions.azureRegionConfiguration) === null || _d === void 0 ? void 0 : _d.azureRegion) === Constants.AZURE_REGION_AUTO_DISCOVER_FLAG
7422
- ? autodetectedRegionName
7423
- : (_e = this.authorityOptions.azureRegionConfiguration) === null || _e === void 0 ? void 0 : _e.azureRegion;
7424
- if (((_f = this.authorityOptions.azureRegionConfiguration) === null || _f === void 0 ? void 0 : _f.azureRegion) === Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) {
7425
- this.regionDiscoveryMetadata.region_outcome = autodetectedRegionName ?
7426
- RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL :
7427
- RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED;
7428
- }
7429
- else {
7430
- if (autodetectedRegionName) {
7431
- this.regionDiscoveryMetadata.region_outcome = (((_g = this.authorityOptions.azureRegionConfiguration) === null || _g === void 0 ? void 0 : _g.azureRegion) === autodetectedRegionName) ?
7432
- RegionDiscoveryOutcomes.CONFIGURED_MATCHES_DETECTED :
7433
- RegionDiscoveryOutcomes.CONFIGURED_NOT_DETECTED;
7434
- }
7435
- else {
7436
- this.regionDiscoveryMetadata.region_outcome = RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION;
7437
- }
7429
+ userConfiguredAzureRegion = (_b = this.authorityOptions.azureRegionConfiguration) === null || _b === void 0 ? void 0 : _b.azureRegion;
7430
+ if (!userConfiguredAzureRegion) return [3 /*break*/, 2];
7431
+ if (userConfiguredAzureRegion !== Constants.AZURE_REGION_AUTO_DISCOVER_FLAG) {
7432
+ this.regionDiscoveryMetadata.region_outcome = RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION;
7433
+ this.regionDiscoveryMetadata.region_used = userConfiguredAzureRegion;
7434
+ return [2 /*return*/, Authority.replaceWithRegionalInformation(metadata, userConfiguredAzureRegion)];
7438
7435
  }
7439
- if (azureRegion) {
7440
- this.regionDiscoveryMetadata.region_used = azureRegion;
7441
- return [2 /*return*/, Authority.replaceWithRegionalInformation(metadata, azureRegion)];
7436
+ (_c = this.performanceClient) === null || _c === void 0 ? void 0 : _c.setPreQueueTime(exports.PerformanceEvents.RegionDiscoveryDetectRegion, this.correlationId);
7437
+ return [4 /*yield*/, this.regionDiscovery.detectRegion((_d = this.authorityOptions.azureRegionConfiguration) === null || _d === void 0 ? void 0 : _d.environmentRegion, this.regionDiscoveryMetadata)];
7438
+ case 1:
7439
+ autodetectedRegionName = _e.sent();
7440
+ if (autodetectedRegionName) {
7441
+ this.regionDiscoveryMetadata.region_outcome = RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL;
7442
+ this.regionDiscoveryMetadata.region_used = autodetectedRegionName;
7443
+ return [2 /*return*/, Authority.replaceWithRegionalInformation(metadata, autodetectedRegionName)];
7442
7444
  }
7443
- return [2 /*return*/, metadata];
7445
+ this.regionDiscoveryMetadata.region_outcome = RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED;
7446
+ _e.label = 2;
7447
+ case 2: return [2 /*return*/, metadata];
7444
7448
  }
7445
7449
  });
7446
7450
  });
@@ -7764,7 +7768,7 @@ var Authority = /** @class */ (function () {
7764
7768
  return Authority;
7765
7769
  }());
7766
7770
 
7767
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7771
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7768
7772
 
7769
7773
  /*
7770
7774
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7828,7 +7832,7 @@ var AuthorityFactory = /** @class */ (function () {
7828
7832
  return AuthorityFactory;
7829
7833
  }());
7830
7834
 
7831
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7835
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7832
7836
 
7833
7837
  /*
7834
7838
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7859,7 +7863,7 @@ var ServerTelemetryEntity = /** @class */ (function () {
7859
7863
  return ServerTelemetryEntity;
7860
7864
  }());
7861
7865
 
7862
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7866
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7863
7867
 
7864
7868
  /*
7865
7869
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7887,7 +7891,7 @@ var ThrottlingEntity = /** @class */ (function () {
7887
7891
  return ThrottlingEntity;
7888
7892
  }());
7889
7893
 
7890
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7894
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7891
7895
 
7892
7896
  /*
7893
7897
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7904,7 +7908,7 @@ var StubbedNetworkModule = {
7904
7908
  }
7905
7909
  };
7906
7910
 
7907
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7911
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7908
7912
 
7909
7913
  /*
7910
7914
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7949,7 +7953,7 @@ var JoseHeaderError = /** @class */ (function (_super) {
7949
7953
  return JoseHeaderError;
7950
7954
  }(AuthError));
7951
7955
 
7952
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7956
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7953
7957
 
7954
7958
  /*
7955
7959
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7989,7 +7993,7 @@ var JoseHeader = /** @class */ (function () {
7989
7993
  return JoseHeader;
7990
7994
  }());
7991
7995
 
7992
- /*! @azure/msal-common v13.1.0 2023-06-07 */
7996
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
7993
7997
 
7994
7998
  /*
7995
7999
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8048,7 +8052,7 @@ var AuthenticationHeaderParser = /** @class */ (function () {
8048
8052
  return AuthenticationHeaderParser;
8049
8053
  }());
8050
8054
 
8051
- /*! @azure/msal-common v13.1.0 2023-06-07 */
8055
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
8052
8056
 
8053
8057
  /*
8054
8058
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8210,7 +8214,7 @@ var ServerTelemetryManager = /** @class */ (function () {
8210
8214
  return ServerTelemetryManager;
8211
8215
  }());
8212
8216
 
8213
- /*! @azure/msal-common v13.1.0 2023-06-07 */
8217
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
8214
8218
 
8215
8219
  /*
8216
8220
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8613,7 +8617,7 @@ var PerformanceClient = /** @class */ (function () {
8613
8617
  return PerformanceClient;
8614
8618
  }());
8615
8619
 
8616
- /*! @azure/msal-common v13.1.0 2023-06-07 */
8620
+ /*! @azure/msal-common v13.2.1 2023-08-07 */
8617
8621
 
8618
8622
  /*
8619
8623
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10831,14 +10835,15 @@ var DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {
10831
10835
  temporaryCacheLocation: exports.BrowserCacheLocation.MemoryStorage,
10832
10836
  storeAuthStateInCookie: false,
10833
10837
  secureCookies: false,
10834
- cacheMigrationEnabled: false
10838
+ cacheMigrationEnabled: false,
10839
+ claimsBasedCachingEnabled: true
10835
10840
  };
10836
10841
  return new BrowserCacheManager(clientId, cacheOptions, DEFAULT_CRYPTO_IMPLEMENTATION, logger);
10837
10842
  };
10838
10843
 
10839
10844
  /* eslint-disable header/header */
10840
10845
  var name = "@azure/msal-browser";
10841
- var version = "2.37.1";
10846
+ var version = "2.38.1";
10842
10847
 
10843
10848
  /*
10844
10849
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -11337,7 +11342,7 @@ var BaseInteractionClient = /** @class */ (function () {
11337
11342
  }
11338
11343
  this.logger.verbose("Authentication Scheme set to \"" + validatedRequest.authenticationScheme + "\" as configured in Auth request");
11339
11344
  }
11340
- if (!(request.claims && !StringUtils.isEmpty(request.claims))) return [3 /*break*/, 4];
11345
+ if (!(this.config.cache.claimsBasedCachingEnabled && request.claims && !StringUtils.isEmptyObj(request.claims))) return [3 /*break*/, 4];
11341
11346
  _a = validatedRequest;
11342
11347
  return [4 /*yield*/, this.browserCrypto.hashString(request.claims)];
11343
11348
  case 3:
@@ -11601,6 +11606,9 @@ var StandardInteractionClient = /** @class */ (function (_super) {
11601
11606
  logLevel: logger.logLevel,
11602
11607
  correlationId: this.correlationId
11603
11608
  },
11609
+ cacheOptions: {
11610
+ claimsBasedCachingEnabled: this.config.cache.claimsBasedCachingEnabled
11611
+ },
11604
11612
  cryptoInterface: this.browserCrypto,
11605
11613
  networkInterface: this.networkClient,
11606
11614
  storageInterface: this.browserStorage,
@@ -14001,7 +14009,8 @@ function buildConfiguration(_a, isBrowserEnvironment) {
14001
14009
  storeAuthStateInCookie: false,
14002
14010
  secureCookies: false,
14003
14011
  // Default cache migration to true if cache location is localStorage since entries are preserved across tabs/windows. Migration has little to no benefit in sessionStorage and memoryStorage
14004
- cacheMigrationEnabled: userInputCache && userInputCache.cacheLocation === exports.BrowserCacheLocation.LocalStorage ? true : false
14012
+ cacheMigrationEnabled: userInputCache && userInputCache.cacheLocation === exports.BrowserCacheLocation.LocalStorage ? true : false,
14013
+ claimsBasedCachingEnabled: true
14005
14014
  };
14006
14015
  // Default logger options for browser
14007
14016
  var DEFAULT_LOGGER_OPTIONS = {
@@ -16686,7 +16695,8 @@ var ClientApplication = /** @class */ (function () {
16686
16695
  temporaryCacheLocation: exports.BrowserCacheLocation.MemoryStorage,
16687
16696
  storeAuthStateInCookie: false,
16688
16697
  secureCookies: false,
16689
- cacheMigrationEnabled: false
16698
+ cacheMigrationEnabled: false,
16699
+ claimsBasedCachingEnabled: true
16690
16700
  };
16691
16701
  this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger);
16692
16702
  // Initialize the token cache
@@ -17863,13 +17873,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
17863
17873
  return _this.acquireTokenByRefreshToken(silentRequest_1, requestWithCLP_1).catch(function (refreshTokenError) {
17864
17874
  var isServerError = refreshTokenError instanceof ServerError;
17865
17875
  var isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;
17876
+ var rtNotFound = (refreshTokenError.errorCode === InteractionRequiredAuthErrorMessage.noTokensFoundError.code);
17866
17877
  var isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);
17867
17878
  if ((!isServerError ||
17868
17879
  !isInvalidGrantError ||
17869
17880
  isInteractionRequiredError ||
17870
17881
  requestWithCLP_1.cacheLookupPolicy === exports.CacheLookupPolicy.AccessTokenAndRefreshToken ||
17871
17882
  requestWithCLP_1.cacheLookupPolicy === exports.CacheLookupPolicy.RefreshToken)
17872
- && (requestWithCLP_1.cacheLookupPolicy !== exports.CacheLookupPolicy.Skip)) {
17883
+ && (requestWithCLP_1.cacheLookupPolicy !== exports.CacheLookupPolicy.Skip)
17884
+ && !rtNotFound) {
17873
17885
  throw refreshTokenError;
17874
17886
  }
17875
17887
  _this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.", request.correlationId);