@azure/msal-common 13.2.1 → 13.3.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 (74) hide show
  1. package/dist/_virtual/_tslib.js +1 -1
  2. package/dist/account/AuthToken.js +1 -1
  3. package/dist/account/CcsCredential.js +1 -1
  4. package/dist/account/ClientInfo.js +1 -1
  5. package/dist/authority/Authority.js +1 -1
  6. package/dist/authority/AuthorityFactory.js +1 -1
  7. package/dist/authority/AuthorityMetadata.js +1 -1
  8. package/dist/authority/AuthorityOptions.js +1 -1
  9. package/dist/authority/AuthorityType.js +1 -1
  10. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +1 -1
  11. package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
  12. package/dist/authority/OpenIdConfigResponse.js +1 -1
  13. package/dist/authority/ProtocolMode.js +1 -1
  14. package/dist/authority/RegionDiscovery.js +1 -1
  15. package/dist/cache/CacheManager.d.ts.map +1 -1
  16. package/dist/cache/CacheManager.js +12 -3
  17. package/dist/cache/CacheManager.js.map +1 -1
  18. package/dist/cache/entities/AccessTokenEntity.js +1 -1
  19. package/dist/cache/entities/AccountEntity.js +1 -1
  20. package/dist/cache/entities/AppMetadataEntity.js +1 -1
  21. package/dist/cache/entities/AuthorityMetadataEntity.js +1 -1
  22. package/dist/cache/entities/CacheRecord.js +1 -1
  23. package/dist/cache/entities/CredentialEntity.js +1 -1
  24. package/dist/cache/entities/IdTokenEntity.js +1 -1
  25. package/dist/cache/entities/RefreshTokenEntity.js +1 -1
  26. package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
  27. package/dist/cache/entities/ThrottlingEntity.js +1 -1
  28. package/dist/cache/persistence/TokenCacheContext.js +1 -1
  29. package/dist/client/AuthorizationCodeClient.js +1 -1
  30. package/dist/client/BaseClient.js +1 -1
  31. package/dist/client/ClientCredentialClient.js +1 -1
  32. package/dist/client/DeviceCodeClient.js +1 -1
  33. package/dist/client/OnBehalfOfClient.js +1 -1
  34. package/dist/client/RefreshTokenClient.js +1 -1
  35. package/dist/client/SilentFlowClient.js +1 -1
  36. package/dist/client/UsernamePasswordClient.js +1 -1
  37. package/dist/config/ClientConfiguration.js +1 -1
  38. package/dist/crypto/ICrypto.js +1 -1
  39. package/dist/crypto/JoseHeader.js +1 -1
  40. package/dist/crypto/PopTokenGenerator.js +1 -1
  41. package/dist/error/AuthError.js +1 -1
  42. package/dist/error/ClientAuthError.js +1 -1
  43. package/dist/error/ClientConfigurationError.js +1 -1
  44. package/dist/error/InteractionRequiredAuthError.js +1 -1
  45. package/dist/error/JoseHeaderError.js +1 -1
  46. package/dist/error/ServerError.js +1 -1
  47. package/dist/index.cjs.js +17 -4
  48. package/dist/index.cjs.js.map +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/logger/Logger.js +1 -1
  51. package/dist/network/INetworkModule.js +1 -1
  52. package/dist/network/NetworkManager.js +1 -1
  53. package/dist/network/ThrottlingUtils.js +1 -1
  54. package/dist/packageMetadata.d.ts +1 -1
  55. package/dist/packageMetadata.js +2 -2
  56. package/dist/packageMetadata.js.map +1 -1
  57. package/dist/request/AuthenticationHeaderParser.js +1 -1
  58. package/dist/request/RequestParameterBuilder.js +1 -1
  59. package/dist/request/RequestValidator.js +1 -1
  60. package/dist/request/ScopeSet.js +1 -1
  61. package/dist/response/ResponseHandler.js +1 -1
  62. package/dist/telemetry/performance/PerformanceClient.js +1 -1
  63. package/dist/telemetry/performance/PerformanceEvent.d.ts +5 -1
  64. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  65. package/dist/telemetry/performance/PerformanceEvent.js +5 -1
  66. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  67. package/dist/telemetry/performance/StubPerformanceClient.js +1 -1
  68. package/dist/telemetry/server/ServerTelemetryManager.js +1 -1
  69. package/dist/url/UrlString.js +1 -1
  70. package/dist/utils/Constants.js +1 -1
  71. package/dist/utils/ProtocolUtils.js +1 -1
  72. package/dist/utils/StringUtils.js +1 -1
  73. package/dist/utils/TimeUtils.js +1 -1
  74. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { CredentialType, CacheType, Separators, Constants, AuthenticationScheme } from '../../utils/Constants.js';
4
4
  import { ClientAuthError } from '../../error/ClientAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../../_virtual/_tslib.js';
4
4
  import { CredentialEntity } from './CredentialEntity.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../../_virtual/_tslib.js';
4
4
  import { CredentialEntity } from './CredentialEntity.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { SERVER_TELEM_CONSTANTS } from '../../utils/Constants.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { ThrottlingConstants } from '../../utils/Constants.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign, __spreadArrays } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { buildClientConfiguration } from '../config/ClientConfiguration.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BaseClient } from './BaseClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from '../error/AuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { JoseHeaderError } from '../error/JoseHeaderError.js';
4
4
  import { JsonTypes } from '../utils/Constants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { TimeUtils } from '../utils/TimeUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { Constants } from '../utils/Constants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from './AuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { ClientAuthError } from './ClientAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { Constants } from '../utils/Constants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from './AuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from './AuthError.js';
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -1424,7 +1424,7 @@ var Logger = /** @class */ (function () {
1424
1424
 
1425
1425
  /* eslint-disable header/header */
1426
1426
  var name = "@azure/msal-common";
1427
- var version = "13.2.1";
1427
+ var version = "13.3.1";
1428
1428
 
1429
1429
  /*
1430
1430
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2770,6 +2770,7 @@ var CacheManager = /** @class */ (function () {
2770
2770
  * @param inputRealm
2771
2771
  */
2772
2772
  CacheManager.prototype.getIdToken = function (account, tokenKeys) {
2773
+ var _this = this;
2773
2774
  this.commonLogger.trace("CacheManager - getIdToken called");
2774
2775
  var idTokenFilter = {
2775
2776
  homeAccountId: account.homeAccountId,
@@ -2785,7 +2786,11 @@ var CacheManager = /** @class */ (function () {
2785
2786
  return null;
2786
2787
  }
2787
2788
  else if (numIdTokens > 1) {
2788
- throw ClientAuthError.createMultipleMatchingTokensInCacheError();
2789
+ this.commonLogger.info("CacheManager:getIdToken - Multiple id tokens found, clearing them");
2790
+ idTokens.forEach(function (idToken) {
2791
+ _this.removeIdToken(idToken.generateCredentialKey());
2792
+ });
2793
+ return null;
2789
2794
  }
2790
2795
  this.commonLogger.info("CacheManager:getIdToken - Returning id token");
2791
2796
  return idTokens[0];
@@ -2886,7 +2891,11 @@ var CacheManager = /** @class */ (function () {
2886
2891
  return null;
2887
2892
  }
2888
2893
  else if (numAccessTokens > 1) {
2889
- throw ClientAuthError.createMultipleMatchingTokensInCacheError();
2894
+ this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them");
2895
+ accessTokens.forEach(function (accessToken) {
2896
+ _this.removeAccessToken(accessToken.generateCredentialKey());
2897
+ });
2898
+ return null;
2890
2899
  }
2891
2900
  this.commonLogger.info("CacheManager:getAccessToken - Returning access token");
2892
2901
  return accessTokens[0];
@@ -5139,6 +5148,10 @@ exports.PerformanceEvents = void 0;
5139
5148
  PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
5140
5149
  PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5141
5150
  PerformanceEvents["NativeMessageHandlerHandshake"] = "nativeMessageHandlerHandshake";
5151
+ /**
5152
+ * Cache operations
5153
+ */
5154
+ PerformanceEvents["ClearTokensAndKeysWithClaims"] = "clearTokensAndKeysWithClaims";
5142
5155
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5143
5156
  /**
5144
5157
  * State of the performance event.