@azure/msal-common 15.6.0 → 15.7.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 (136) hide show
  1. package/dist/account/AccountInfo.mjs +1 -1
  2. package/dist/account/AuthToken.mjs +1 -1
  3. package/dist/account/CcsCredential.mjs +1 -1
  4. package/dist/account/ClientInfo.mjs +1 -1
  5. package/dist/account/TokenClaims.mjs +1 -1
  6. package/dist/authority/Authority.mjs +1 -1
  7. package/dist/authority/AuthorityFactory.mjs +1 -1
  8. package/dist/authority/AuthorityMetadata.mjs +1 -1
  9. package/dist/authority/AuthorityOptions.mjs +1 -1
  10. package/dist/authority/AuthorityType.mjs +1 -1
  11. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  12. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  13. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  14. package/dist/authority/ProtocolMode.mjs +1 -1
  15. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  16. package/dist/authority/RegionDiscovery.mjs +6 -9
  17. package/dist/authority/RegionDiscovery.mjs.map +1 -1
  18. package/dist/cache/CacheManager.d.ts +7 -7
  19. package/dist/cache/CacheManager.d.ts.map +1 -1
  20. package/dist/cache/CacheManager.mjs +27 -34
  21. package/dist/cache/CacheManager.mjs.map +1 -1
  22. package/dist/cache/entities/AccountEntity.mjs +1 -1
  23. package/dist/cache/interface/ICacheManager.d.ts +4 -4
  24. package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
  25. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  26. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  27. package/dist/client/AuthorizationCodeClient.mjs +1 -1
  28. package/dist/client/BaseClient.mjs +1 -1
  29. package/dist/client/RefreshTokenClient.mjs +1 -1
  30. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  31. package/dist/client/SilentFlowClient.mjs +2 -2
  32. package/dist/client/SilentFlowClient.mjs.map +1 -1
  33. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  34. package/dist/config/ClientConfiguration.mjs +3 -2
  35. package/dist/config/ClientConfiguration.mjs.map +1 -1
  36. package/dist/constants/AADServerParamKeys.mjs +1 -1
  37. package/dist/crypto/ICrypto.d.ts +1 -1
  38. package/dist/crypto/ICrypto.d.ts.map +1 -1
  39. package/dist/crypto/ICrypto.mjs +1 -1
  40. package/dist/crypto/JoseHeader.mjs +1 -1
  41. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  42. package/dist/error/AuthError.mjs +1 -1
  43. package/dist/error/AuthErrorCodes.mjs +1 -1
  44. package/dist/error/CacheError.mjs +1 -1
  45. package/dist/error/CacheErrorCodes.mjs +1 -1
  46. package/dist/error/ClientAuthError.mjs +1 -1
  47. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  48. package/dist/error/ClientConfigurationError.mjs +1 -1
  49. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  50. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  51. package/dist/error/InteractionRequiredAuthError.mjs +4 -2
  52. package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  53. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +1 -0
  54. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
  55. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +3 -2
  56. package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -1
  57. package/dist/error/JoseHeaderError.mjs +1 -1
  58. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  59. package/dist/error/NetworkError.mjs +1 -1
  60. package/dist/error/ServerError.mjs +1 -1
  61. package/dist/exports-common.d.ts +1 -1
  62. package/dist/exports-common.d.ts.map +1 -1
  63. package/dist/index-browser.mjs +2 -2
  64. package/dist/index-node.mjs +2 -2
  65. package/dist/index.mjs +2 -2
  66. package/dist/logger/Logger.mjs +1 -1
  67. package/dist/network/INetworkModule.mjs +1 -1
  68. package/dist/network/RequestThumbprint.mjs +1 -1
  69. package/dist/network/ThrottlingUtils.mjs +1 -1
  70. package/dist/packageMetadata.d.ts +1 -1
  71. package/dist/packageMetadata.mjs +2 -2
  72. package/dist/protocol/Authorize.mjs +1 -1
  73. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  74. package/dist/request/RequestParameterBuilder.mjs +1 -1
  75. package/dist/request/RequestValidator.mjs +1 -1
  76. package/dist/request/ScopeSet.mjs +1 -1
  77. package/dist/response/ResponseHandler.mjs +1 -1
  78. package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
  79. package/dist/telemetry/performance/PerformanceEvent.d.ts +4 -0
  80. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  81. package/dist/telemetry/performance/PerformanceEvent.mjs +1 -1
  82. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  83. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  84. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  85. package/dist/url/UrlString.mjs +1 -1
  86. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  87. package/dist/utils/Constants.d.ts +6 -8
  88. package/dist/utils/Constants.d.ts.map +1 -1
  89. package/dist/utils/Constants.mjs +8 -10
  90. package/dist/utils/Constants.mjs.map +1 -1
  91. package/dist/utils/FunctionWrappers.mjs +1 -1
  92. package/dist/utils/ProtocolUtils.mjs +1 -1
  93. package/dist/utils/StringUtils.mjs +1 -1
  94. package/dist/utils/TimeUtils.mjs +1 -1
  95. package/dist/utils/UrlUtils.mjs +1 -1
  96. package/lib/index-browser.cjs +5 -81
  97. package/lib/index-browser.cjs.map +1 -1
  98. package/lib/{index-node-CnK83wp7.js → index-node-B6ITzmFz.js} +125 -53
  99. package/lib/index-node-B6ITzmFz.js.map +1 -0
  100. package/lib/index-node.cjs +3 -2
  101. package/lib/index-node.cjs.map +1 -1
  102. package/lib/index.cjs +4 -3
  103. package/lib/index.cjs.map +1 -1
  104. package/lib/types/authority/RegionDiscovery.d.ts.map +1 -1
  105. package/lib/types/cache/CacheManager.d.ts +7 -7
  106. package/lib/types/cache/CacheManager.d.ts.map +1 -1
  107. package/lib/types/cache/interface/ICacheManager.d.ts +4 -4
  108. package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -1
  109. package/lib/types/client/SilentFlowClient.d.ts.map +1 -1
  110. package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
  111. package/lib/types/crypto/ICrypto.d.ts +1 -1
  112. package/lib/types/crypto/ICrypto.d.ts.map +1 -1
  113. package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -1
  114. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +1 -0
  115. package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
  116. package/lib/types/exports-common.d.ts +1 -1
  117. package/lib/types/exports-common.d.ts.map +1 -1
  118. package/lib/types/packageMetadata.d.ts +1 -1
  119. package/lib/types/telemetry/performance/PerformanceEvent.d.ts +4 -0
  120. package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  121. package/lib/types/utils/Constants.d.ts +6 -8
  122. package/lib/types/utils/Constants.d.ts.map +1 -1
  123. package/package.json +1 -1
  124. package/src/authority/RegionDiscovery.ts +5 -10
  125. package/src/cache/CacheManager.ts +44 -39
  126. package/src/cache/interface/ICacheManager.ts +4 -4
  127. package/src/client/SilentFlowClient.ts +1 -3
  128. package/src/config/ClientConfiguration.ts +3 -1
  129. package/src/crypto/ICrypto.ts +2 -2
  130. package/src/error/InteractionRequiredAuthError.ts +3 -0
  131. package/src/error/InteractionRequiredAuthErrorCodes.ts +1 -0
  132. package/src/exports-common.ts +1 -0
  133. package/src/packageMetadata.ts +1 -1
  134. package/src/telemetry/performance/PerformanceEvent.ts +5 -0
  135. package/src/utils/Constants.ts +7 -9
  136. package/lib/index-node-CnK83wp7.js.map +0 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v15.6.0 2025-05-06 */
1
+ /*! @azure/msal-common v15.7.1 2025-06-18 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -276,13 +276,6 @@ const PasswordGrantConstants = {
276
276
  username: "username",
277
277
  password: "password",
278
278
  };
279
- /**
280
- * Response codes
281
- */
282
- const ResponseCodes = {
283
- httpSuccess: 200,
284
- httpBadRequest: 400,
285
- };
286
279
  /**
287
280
  * Region Discovery Sources
288
281
  */
@@ -324,7 +317,12 @@ const JsonWebTokenTypes = {
324
317
  };
325
318
  const ONE_DAY_IN_MS = 86400000;
326
319
  // Token renewal offset default in seconds
327
- const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
320
+ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
321
+ const EncodingTypes = {
322
+ BASE64: "base64",
323
+ HEX: "hex",
324
+ UTF8: "utf-8",
325
+ };
328
326
 
329
327
  /*
330
328
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2174,15 +2172,13 @@ class RegionDiscovery {
2174
2172
  const options = RegionDiscovery.IMDS_OPTIONS;
2175
2173
  try {
2176
2174
  const localIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(Constants.IMDS_VERSION, options);
2177
- if (localIMDSVersionResponse.status ===
2178
- ResponseCodes.httpSuccess) {
2175
+ if (localIMDSVersionResponse.status === HttpStatus.SUCCESS) {
2179
2176
  autodetectedRegionName = localIMDSVersionResponse.body;
2180
2177
  regionDiscoveryMetadata.region_source =
2181
2178
  RegionDiscoverySources.IMDS;
2182
2179
  }
2183
2180
  // If the response using the local IMDS version failed, try to fetch the current version of IMDS and retry.
2184
- if (localIMDSVersionResponse.status ===
2185
- ResponseCodes.httpBadRequest) {
2181
+ if (localIMDSVersionResponse.status === HttpStatus.BAD_REQUEST) {
2186
2182
  const currentIMDSVersion = await invokeAsync(this.getCurrentVersion.bind(this), PerformanceEvents.RegionDiscoveryGetCurrentVersion, this.logger, this.performanceClient, this.correlationId)(options);
2187
2183
  if (!currentIMDSVersion) {
2188
2184
  regionDiscoveryMetadata.region_source =
@@ -2190,8 +2186,7 @@ class RegionDiscovery {
2190
2186
  return null;
2191
2187
  }
2192
2188
  const currentIMDSVersionResponse = await invokeAsync(this.getRegionFromIMDS.bind(this), PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, this.logger, this.performanceClient, this.correlationId)(currentIMDSVersion, options);
2193
- if (currentIMDSVersionResponse.status ===
2194
- ResponseCodes.httpSuccess) {
2189
+ if (currentIMDSVersionResponse.status === HttpStatus.SUCCESS) {
2195
2190
  autodetectedRegionName =
2196
2191
  currentIMDSVersionResponse.body;
2197
2192
  regionDiscoveryMetadata.region_source =
@@ -2236,7 +2231,7 @@ class RegionDiscovery {
2236
2231
  try {
2237
2232
  const response = await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`, options);
2238
2233
  // When IMDS endpoint is called without the api version query param, bad request response comes back with latest version.
2239
- if (response.status === ResponseCodes.httpBadRequest &&
2234
+ if (response.status === HttpStatus.BAD_REQUEST &&
2240
2235
  response.body &&
2241
2236
  response.body["newest-versions"] &&
2242
2237
  response.body["newest-versions"].length > 0) {
@@ -3898,7 +3893,7 @@ class Logger {
3898
3893
 
3899
3894
  /* eslint-disable header/header */
3900
3895
  const name = "@azure/msal-common";
3901
- const version = "15.6.0";
3896
+ const version = "15.7.1";
3902
3897
 
3903
3898
  /*
3904
3899
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4514,11 +4509,12 @@ class CacheError extends Error {
4514
4509
  * @internal
4515
4510
  */
4516
4511
  class CacheManager {
4517
- constructor(clientId, cryptoImpl, logger, staticAuthorityOptions) {
4512
+ constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions) {
4518
4513
  this.clientId = clientId;
4519
4514
  this.cryptoImpl = cryptoImpl;
4520
4515
  this.commonLogger = logger.clone(name, version);
4521
4516
  this.staticAuthorityOptions = staticAuthorityOptions;
4517
+ this.performanceClient = performanceClient;
4522
4518
  }
4523
4519
  /**
4524
4520
  * Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
@@ -4727,7 +4723,6 @@ class CacheManager {
4727
4723
  };
4728
4724
  const tokenKeys = this.getTokenKeys();
4729
4725
  const currentScopes = ScopeSet.fromString(credential.target);
4730
- const removedAccessTokens = [];
4731
4726
  tokenKeys.accessToken.forEach((key) => {
4732
4727
  if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) {
4733
4728
  return;
@@ -4737,11 +4732,10 @@ class CacheManager {
4737
4732
  this.credentialMatchesFilter(tokenEntity, accessTokenFilter)) {
4738
4733
  const tokenScopeSet = ScopeSet.fromString(tokenEntity.target);
4739
4734
  if (tokenScopeSet.intersectingScopeSets(currentScopes)) {
4740
- removedAccessTokens.push(this.removeAccessToken(key));
4735
+ this.removeAccessToken(key, correlationId);
4741
4736
  }
4742
4737
  }
4743
4738
  });
4744
- await Promise.all(removedAccessTokens);
4745
4739
  await this.setAccessTokenCredential(credential, correlationId);
4746
4740
  }
4747
4741
  /**
@@ -4983,34 +4977,31 @@ class CacheManager {
4983
4977
  /**
4984
4978
  * Removes all accounts and related tokens from cache.
4985
4979
  */
4986
- async removeAllAccounts() {
4980
+ removeAllAccounts(correlationId) {
4987
4981
  const allAccountKeys = this.getAccountKeys();
4988
- const removedAccounts = [];
4989
4982
  allAccountKeys.forEach((cacheKey) => {
4990
- removedAccounts.push(this.removeAccount(cacheKey));
4983
+ this.removeAccount(cacheKey, correlationId);
4991
4984
  });
4992
- await Promise.all(removedAccounts);
4993
4985
  }
4994
4986
  /**
4995
4987
  * Removes the account and related tokens for a given account key
4996
4988
  * @param account
4997
4989
  */
4998
- async removeAccount(accountKey) {
4990
+ removeAccount(accountKey, correlationId) {
4999
4991
  const account = this.getAccount(accountKey, this.commonLogger);
5000
4992
  if (!account) {
5001
4993
  return;
5002
4994
  }
5003
- await this.removeAccountContext(account);
4995
+ this.removeAccountContext(account, correlationId);
5004
4996
  this.removeItem(accountKey);
5005
4997
  }
5006
4998
  /**
5007
4999
  * Removes credentials associated with the provided account
5008
5000
  * @param account
5009
5001
  */
5010
- async removeAccountContext(account) {
5002
+ removeAccountContext(account, correlationId) {
5011
5003
  const allTokenKeys = this.getTokenKeys();
5012
5004
  const accountId = account.generateAccountId();
5013
- const removedCredentials = [];
5014
5005
  allTokenKeys.idToken.forEach((key) => {
5015
5006
  if (key.indexOf(accountId) === 0) {
5016
5007
  this.removeIdToken(key);
@@ -5018,7 +5009,7 @@ class CacheManager {
5018
5009
  });
5019
5010
  allTokenKeys.accessToken.forEach((key) => {
5020
5011
  if (key.indexOf(accountId) === 0) {
5021
- removedCredentials.push(this.removeAccessToken(key));
5012
+ this.removeAccessToken(key, correlationId);
5022
5013
  }
5023
5014
  });
5024
5015
  allTokenKeys.refreshToken.forEach((key) => {
@@ -5026,17 +5017,17 @@ class CacheManager {
5026
5017
  this.removeRefreshToken(key);
5027
5018
  }
5028
5019
  });
5029
- await Promise.all(removedCredentials);
5030
5020
  }
5031
5021
  /**
5032
5022
  * returns a boolean if the given credential is removed
5033
5023
  * @param credential
5034
5024
  */
5035
- async removeAccessToken(key) {
5025
+ removeAccessToken(key, correlationId) {
5036
5026
  const credential = this.getAccessTokenCredential(key);
5037
5027
  if (!credential) {
5038
5028
  return;
5039
5029
  }
5030
+ this.removeItem(key);
5040
5031
  // Remove Token Binding Key from key store for PoP Tokens Credentials
5041
5032
  if (credential.credentialType.toLowerCase() ===
5042
5033
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
@@ -5044,16 +5035,15 @@ class CacheManager {
5044
5035
  const accessTokenWithAuthSchemeEntity = credential;
5045
5036
  const kid = accessTokenWithAuthSchemeEntity.keyId;
5046
5037
  if (kid) {
5047
- try {
5048
- await this.cryptoImpl.removeTokenBindingKey(kid);
5049
- }
5050
- catch (error) {
5051
- throw createClientAuthError(bindingKeyNotRemoved);
5052
- }
5038
+ void this.cryptoImpl
5039
+ .removeTokenBindingKey(kid)
5040
+ .catch(() => {
5041
+ this.commonLogger.error(`Failed to remove token binding key ${kid}`, correlationId);
5042
+ this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
5043
+ });
5053
5044
  }
5054
5045
  }
5055
5046
  }
5056
- return this.removeItem(key);
5057
5047
  }
5058
5048
  /**
5059
5049
  * Removes all app metadata objects from cache.
@@ -5195,10 +5185,10 @@ class CacheManager {
5195
5185
  * @param request {BaseAuthRequest}
5196
5186
  * @param tokenKeys {?TokenKeys}
5197
5187
  * @param performanceClient {?IPerformanceClient}
5198
- * @param correlationId {?string}
5199
5188
  */
5200
- getAccessToken(account, request, tokenKeys, targetRealm, performanceClient, correlationId) {
5201
- this.commonLogger.trace("CacheManager - getAccessToken called");
5189
+ getAccessToken(account, request, tokenKeys, targetRealm) {
5190
+ const correlationId = request.correlationId;
5191
+ this.commonLogger.trace("CacheManager - getAccessToken called", correlationId);
5202
5192
  const scopes = ScopeSet.createSearchScopes(request.scopes);
5203
5193
  const authScheme = request.authenticationScheme || AuthenticationScheme.BEARER;
5204
5194
  /*
@@ -5237,20 +5227,18 @@ class CacheManager {
5237
5227
  });
5238
5228
  const numAccessTokens = accessTokens.length;
5239
5229
  if (numAccessTokens < 1) {
5240
- this.commonLogger.info("CacheManager:getAccessToken - No token found");
5230
+ this.commonLogger.info("CacheManager:getAccessToken - No token found", correlationId);
5241
5231
  return null;
5242
5232
  }
5243
5233
  else if (numAccessTokens > 1) {
5244
- this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them");
5234
+ this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them", correlationId);
5245
5235
  accessTokens.forEach((accessToken) => {
5246
- void this.removeAccessToken(generateCredentialKey(accessToken));
5236
+ this.removeAccessToken(generateCredentialKey(accessToken), correlationId);
5247
5237
  });
5248
- if (performanceClient && correlationId) {
5249
- performanceClient.addFields({ multiMatchedAT: accessTokens.length }, correlationId);
5250
- }
5238
+ this.performanceClient.addFields({ multiMatchedAT: accessTokens.length }, correlationId);
5251
5239
  return null;
5252
5240
  }
5253
- this.commonLogger.info("CacheManager:getAccessToken - Returning access token");
5241
+ this.commonLogger.info("CacheManager:getAccessToken - Returning access token", correlationId);
5254
5242
  return accessTokens[0];
5255
5243
  }
5256
5244
  /**
@@ -5688,6 +5676,83 @@ class DefaultStorageClass extends CacheManager {
5688
5676
  }
5689
5677
  }
5690
5678
 
5679
+ /*
5680
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5681
+ * Licensed under the MIT License.
5682
+ */
5683
+ class StubPerformanceMeasurement {
5684
+ startMeasurement() {
5685
+ return;
5686
+ }
5687
+ endMeasurement() {
5688
+ return;
5689
+ }
5690
+ flushMeasurement() {
5691
+ return null;
5692
+ }
5693
+ }
5694
+ class StubPerformanceClient {
5695
+ generateId() {
5696
+ return "callback-id";
5697
+ }
5698
+ startMeasurement(measureName, correlationId) {
5699
+ return {
5700
+ end: () => null,
5701
+ discard: () => { },
5702
+ add: () => { },
5703
+ increment: () => { },
5704
+ event: {
5705
+ eventId: this.generateId(),
5706
+ status: PerformanceEventStatus.InProgress,
5707
+ authority: "",
5708
+ libraryName: "",
5709
+ libraryVersion: "",
5710
+ clientId: "",
5711
+ name: measureName,
5712
+ startTimeMs: Date.now(),
5713
+ correlationId: correlationId || "",
5714
+ },
5715
+ measurement: new StubPerformanceMeasurement(),
5716
+ };
5717
+ }
5718
+ startPerformanceMeasurement() {
5719
+ return new StubPerformanceMeasurement();
5720
+ }
5721
+ calculateQueuedTime() {
5722
+ return 0;
5723
+ }
5724
+ addQueueMeasurement() {
5725
+ return;
5726
+ }
5727
+ setPreQueueTime() {
5728
+ return;
5729
+ }
5730
+ endMeasurement() {
5731
+ return null;
5732
+ }
5733
+ discardMeasurements() {
5734
+ return;
5735
+ }
5736
+ removePerformanceCallback() {
5737
+ return true;
5738
+ }
5739
+ addPerformanceCallback() {
5740
+ return "";
5741
+ }
5742
+ emitEvents() {
5743
+ return;
5744
+ }
5745
+ addFields() {
5746
+ return;
5747
+ }
5748
+ incrementFields() {
5749
+ return;
5750
+ }
5751
+ cacheEventByCorrelationId() {
5752
+ return;
5753
+ }
5754
+ }
5755
+
5691
5756
  /*
5692
5757
  * Copyright (c) Microsoft Corporation. All rights reserved.
5693
5758
  * Licensed under the MIT License.
@@ -5753,7 +5818,7 @@ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions:
5753
5818
  loggerOptions: loggerOptions,
5754
5819
  cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions },
5755
5820
  storageInterface: storageImplementation ||
5756
- new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),
5821
+ new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions), new StubPerformanceClient()),
5757
5822
  networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
5758
5823
  cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
5759
5824
  clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
@@ -6550,6 +6615,7 @@ class BaseClient {
6550
6615
  const noTokensFound = "no_tokens_found";
6551
6616
  const nativeAccountUnavailable = "native_account_unavailable";
6552
6617
  const refreshTokenExpired = "refresh_token_expired";
6618
+ const uxNotAllowed = "ux_not_allowed";
6553
6619
  // Codes potentially returned by server
6554
6620
  const interactionRequired = "interaction_required";
6555
6621
  const consentRequired = "consent_required";
@@ -6564,7 +6630,8 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
6564
6630
  loginRequired: loginRequired,
6565
6631
  nativeAccountUnavailable: nativeAccountUnavailable,
6566
6632
  noTokensFound: noTokensFound,
6567
- refreshTokenExpired: refreshTokenExpired
6633
+ refreshTokenExpired: refreshTokenExpired,
6634
+ uxNotAllowed: uxNotAllowed
6568
6635
  });
6569
6636
 
6570
6637
  /*
@@ -6579,6 +6646,7 @@ const InteractionRequiredServerErrorMessage = [
6579
6646
  consentRequired,
6580
6647
  loginRequired,
6581
6648
  badToken,
6649
+ uxNotAllowed,
6582
6650
  ];
6583
6651
  const InteractionRequiredAuthSubErrorMessage = [
6584
6652
  "message_only",
@@ -6593,6 +6661,7 @@ const InteractionRequiredAuthErrorMessages = {
6593
6661
  [nativeAccountUnavailable]: "The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",
6594
6662
  [refreshTokenExpired]: "Refresh token has expired.",
6595
6663
  [badToken]: "Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",
6664
+ [uxNotAllowed]: "`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve.",
6596
6665
  };
6597
6666
  /**
6598
6667
  * Interaction required errors defined by the SDK
@@ -7715,7 +7784,7 @@ class SilentFlowClient extends BaseClient {
7715
7784
  const requestTenantId = request.account.tenantId ||
7716
7785
  getTenantFromAuthorityString(request.authority);
7717
7786
  const tokenKeys = this.cacheManager.getTokenKeys();
7718
- const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId, this.performanceClient, request.correlationId);
7787
+ const cachedAccessToken = this.cacheManager.getAccessToken(request.account, request, tokenKeys, requestTenantId);
7719
7788
  if (!cachedAccessToken) {
7720
7789
  // must refresh due to non-existent access_token
7721
7790
  this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
@@ -8380,6 +8449,7 @@ exports.DEFAULT_CRYPTO_IMPLEMENTATION = DEFAULT_CRYPTO_IMPLEMENTATION;
8380
8449
  exports.DEFAULT_SYSTEM_OPTIONS = DEFAULT_SYSTEM_OPTIONS;
8381
8450
  exports.DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = DEFAULT_TOKEN_RENEWAL_OFFSET_SEC;
8382
8451
  exports.DefaultStorageClass = DefaultStorageClass;
8452
+ exports.EncodingTypes = EncodingTypes;
8383
8453
  exports.Errors = Errors;
8384
8454
  exports.GrantType = GrantType;
8385
8455
  exports.HeaderNames = HeaderNames;
@@ -8413,6 +8483,8 @@ exports.ServerResponseType = ServerResponseType;
8413
8483
  exports.ServerTelemetryManager = ServerTelemetryManager;
8414
8484
  exports.SilentFlowClient = SilentFlowClient;
8415
8485
  exports.StringUtils = StringUtils;
8486
+ exports.StubPerformanceClient = StubPerformanceClient;
8487
+ exports.StubPerformanceMeasurement = StubPerformanceMeasurement;
8416
8488
  exports.StubbedNetworkModule = StubbedNetworkModule;
8417
8489
  exports.THE_FAMILY_ID = THE_FAMILY_ID;
8418
8490
  exports.ThrottlingConstants = ThrottlingConstants;
@@ -8440,4 +8512,4 @@ exports.invokeAsync = invokeAsync;
8440
8512
  exports.tenantIdMatchesHomeTenant = tenantIdMatchesHomeTenant;
8441
8513
  exports.updateAccountTenantProfileData = updateAccountTenantProfileData;
8442
8514
  exports.version = version;
8443
- //# sourceMappingURL=index-node-CnK83wp7.js.map
8515
+ //# sourceMappingURL=index-node-B6ITzmFz.js.map