@azure/msal-common 9.0.1 → 9.0.3

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 (151) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/_virtual/_tslib.js +1 -1
  4. package/dist/account/AuthToken.js +1 -1
  5. package/dist/account/AuthToken.js.map +1 -1
  6. package/dist/account/CcsCredential.js +1 -1
  7. package/dist/account/CcsCredential.js.map +1 -1
  8. package/dist/account/ClientInfo.js +1 -1
  9. package/dist/account/ClientInfo.js.map +1 -1
  10. package/dist/authority/Authority.js +1 -1
  11. package/dist/authority/Authority.js.map +1 -1
  12. package/dist/authority/AuthorityFactory.js +1 -1
  13. package/dist/authority/AuthorityFactory.js.map +1 -1
  14. package/dist/authority/AuthorityMetadata.js +1 -1
  15. package/dist/authority/AuthorityMetadata.js.map +1 -1
  16. package/dist/authority/AuthorityOptions.js +1 -1
  17. package/dist/authority/AuthorityOptions.js.map +1 -1
  18. package/dist/authority/AuthorityType.js +1 -1
  19. package/dist/authority/AuthorityType.js.map +1 -1
  20. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +1 -1
  21. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -1
  22. package/dist/authority/CloudInstanceDiscoveryResponse.js +1 -1
  23. package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -1
  24. package/dist/authority/OpenIdConfigResponse.js +1 -1
  25. package/dist/authority/OpenIdConfigResponse.js.map +1 -1
  26. package/dist/authority/ProtocolMode.js +1 -1
  27. package/dist/authority/ProtocolMode.js.map +1 -1
  28. package/dist/authority/RegionDiscovery.js +1 -1
  29. package/dist/authority/RegionDiscovery.js.map +1 -1
  30. package/dist/cache/CacheManager.js +1 -1
  31. package/dist/cache/CacheManager.js.map +1 -1
  32. package/dist/cache/entities/AccessTokenEntity.js +1 -1
  33. package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
  34. package/dist/cache/entities/AccountEntity.js +1 -1
  35. package/dist/cache/entities/AccountEntity.js.map +1 -1
  36. package/dist/cache/entities/AppMetadataEntity.js +1 -1
  37. package/dist/cache/entities/AppMetadataEntity.js.map +1 -1
  38. package/dist/cache/entities/AuthorityMetadataEntity.js +1 -1
  39. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
  40. package/dist/cache/entities/CacheRecord.js +1 -1
  41. package/dist/cache/entities/CacheRecord.js.map +1 -1
  42. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  43. package/dist/cache/entities/CredentialEntity.js +10 -13
  44. package/dist/cache/entities/CredentialEntity.js.map +1 -1
  45. package/dist/cache/entities/IdTokenEntity.js +1 -1
  46. package/dist/cache/entities/IdTokenEntity.js.map +1 -1
  47. package/dist/cache/entities/RefreshTokenEntity.js +1 -1
  48. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -1
  49. package/dist/cache/entities/ServerTelemetryEntity.js +1 -1
  50. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -1
  51. package/dist/cache/entities/ThrottlingEntity.js +1 -1
  52. package/dist/cache/entities/ThrottlingEntity.js.map +1 -1
  53. package/dist/cache/persistence/TokenCacheContext.js +1 -1
  54. package/dist/cache/persistence/TokenCacheContext.js.map +1 -1
  55. package/dist/client/AuthorizationCodeClient.d.ts +2 -1
  56. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  57. package/dist/client/AuthorizationCodeClient.js +33 -12
  58. package/dist/client/AuthorizationCodeClient.js.map +1 -1
  59. package/dist/client/BaseClient.d.ts.map +1 -1
  60. package/dist/client/BaseClient.js +1 -1
  61. package/dist/client/BaseClient.js.map +1 -1
  62. package/dist/client/ClientCredentialClient.js +1 -1
  63. package/dist/client/ClientCredentialClient.js.map +1 -1
  64. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  65. package/dist/client/DeviceCodeClient.js +1 -1
  66. package/dist/client/DeviceCodeClient.js.map +1 -1
  67. package/dist/client/OnBehalfOfClient.js +1 -1
  68. package/dist/client/OnBehalfOfClient.js.map +1 -1
  69. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  70. package/dist/client/RefreshTokenClient.js +14 -8
  71. package/dist/client/RefreshTokenClient.js.map +1 -1
  72. package/dist/client/SilentFlowClient.js +1 -1
  73. package/dist/client/SilentFlowClient.js.map +1 -1
  74. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  75. package/dist/client/UsernamePasswordClient.js +13 -7
  76. package/dist/client/UsernamePasswordClient.js.map +1 -1
  77. package/dist/config/ClientConfiguration.js +1 -1
  78. package/dist/config/ClientConfiguration.js.map +1 -1
  79. package/dist/crypto/ICrypto.js +1 -1
  80. package/dist/crypto/ICrypto.js.map +1 -1
  81. package/dist/crypto/JoseHeader.js +3 -3
  82. package/dist/crypto/JoseHeader.js.map +1 -1
  83. package/dist/crypto/PopTokenGenerator.js +1 -1
  84. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  85. package/dist/error/AuthError.js +1 -1
  86. package/dist/error/AuthError.js.map +1 -1
  87. package/dist/error/ClientAuthError.js +1 -1
  88. package/dist/error/ClientAuthError.js.map +1 -1
  89. package/dist/error/ClientConfigurationError.js +1 -1
  90. package/dist/error/ClientConfigurationError.js.map +1 -1
  91. package/dist/error/InteractionRequiredAuthError.js +1 -1
  92. package/dist/error/InteractionRequiredAuthError.js.map +1 -1
  93. package/dist/error/JoseHeaderError.js +1 -1
  94. package/dist/error/JoseHeaderError.js.map +1 -1
  95. package/dist/error/ServerError.js +1 -1
  96. package/dist/error/ServerError.js.map +1 -1
  97. package/dist/index.cjs.js +93 -46
  98. package/dist/index.cjs.js.map +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/logger/Logger.d.ts +1 -0
  101. package/dist/logger/Logger.d.ts.map +1 -1
  102. package/dist/logger/Logger.js +15 -5
  103. package/dist/logger/Logger.js.map +1 -1
  104. package/dist/network/INetworkModule.js +1 -1
  105. package/dist/network/INetworkModule.js.map +1 -1
  106. package/dist/network/NetworkManager.js +1 -1
  107. package/dist/network/NetworkManager.js.map +1 -1
  108. package/dist/network/ThrottlingUtils.js +1 -1
  109. package/dist/network/ThrottlingUtils.js.map +1 -1
  110. package/dist/packageMetadata.d.ts +1 -1
  111. package/dist/packageMetadata.js +2 -2
  112. package/dist/packageMetadata.js.map +1 -1
  113. package/dist/request/AuthenticationHeaderParser.js +1 -1
  114. package/dist/request/AuthenticationHeaderParser.js.map +1 -1
  115. package/dist/request/RequestParameterBuilder.js +1 -1
  116. package/dist/request/RequestParameterBuilder.js.map +1 -1
  117. package/dist/request/RequestValidator.js +1 -1
  118. package/dist/request/RequestValidator.js.map +1 -1
  119. package/dist/request/ScopeSet.js +1 -1
  120. package/dist/request/ScopeSet.js.map +1 -1
  121. package/dist/response/ResponseHandler.js +2 -2
  122. package/dist/response/ResponseHandler.js.map +1 -1
  123. package/dist/telemetry/performance/IPerformanceClient.d.ts +1 -1
  124. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
  125. package/dist/telemetry/performance/PerformanceClient.d.ts +1 -1
  126. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  127. package/dist/telemetry/performance/PerformanceClient.js +2 -2
  128. package/dist/telemetry/performance/PerformanceClient.js.map +1 -1
  129. package/dist/telemetry/performance/PerformanceEvent.d.ts +8 -1
  130. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  131. package/dist/telemetry/performance/PerformanceEvent.js +6 -1
  132. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  133. package/dist/telemetry/performance/StubPerformanceClient.d.ts +1 -1
  134. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  135. package/dist/telemetry/performance/StubPerformanceClient.js +2 -2
  136. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
  137. package/dist/telemetry/server/ServerTelemetryManager.js +1 -1
  138. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
  139. package/dist/url/UrlString.js +1 -1
  140. package/dist/url/UrlString.js.map +1 -1
  141. package/dist/utils/Constants.d.ts +4 -2
  142. package/dist/utils/Constants.d.ts.map +1 -1
  143. package/dist/utils/Constants.js +3 -1
  144. package/dist/utils/Constants.js.map +1 -1
  145. package/dist/utils/ProtocolUtils.js +1 -1
  146. package/dist/utils/ProtocolUtils.js.map +1 -1
  147. package/dist/utils/StringUtils.js +1 -1
  148. package/dist/utils/StringUtils.js.map +1 -1
  149. package/dist/utils/TimeUtils.js +1 -1
  150. package/dist/utils/TimeUtils.js.map +1 -1
  151. package/package.json +76 -76
@@ -1 +1 @@
1
- {"version":3,"file":"InteractionRequiredAuthError.js","sources":["../../src/error/InteractionRequiredAuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\n */\nexport const InteractionRequiredServerErrorMessage = [\n \"interaction_required\",\n \"consent_required\",\n \"login_required\"\n];\n\nexport const InteractionRequiredAuthSubErrorMessage = [\n \"message_only\",\n \"additional_action\",\n \"basic_action\",\n \"user_password_expired\",\n \"consent_required\"\n];\n\n/**\n * Interaction required errors defined by the SDK\n */\nexport const InteractionRequiredAuthErrorMessage = {\n noTokensFoundError: {\n code: \"no_tokens_found\",\n desc: \"No refresh token found in the cache. Please sign-in.\"\n },\n native_account_unavailable: {\n code: \"native_account_unavailable\",\n desc: \"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.\"\n }\n};\n\n/**\n * Error thrown when user interaction is required.\n */\nexport class InteractionRequiredAuthError extends AuthError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"InteractionRequiredAuthError\";\n\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\n }\n\n /**\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\n * @param errorCode \n * @param errorString \n * @param subError \n */\n static isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string): boolean {\n const isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\n const isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\n const isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredServerErrorMessage.some((irErrorCode) => {\n return errorString.indexOf(irErrorCode) > -1;\n });\n\n return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;\n }\n\n /**\n * Creates an error thrown when the authorization code required for a token request is null or empty.\n */\n static createNoTokensFoundError(): InteractionRequiredAuthError {\n return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.noTokensFoundError.code, InteractionRequiredAuthErrorMessage.noTokensFoundError.desc);\n }\n\n /**\n * Creates an error thrown when the native broker returns ACCOUNT_UNAVAILABLE status, indicating that the account was removed and interactive sign-in is required\n * @returns \n */\n static createNativeAccountUnavailableError(): InteractionRequiredAuthError {\n return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.native_account_unavailable.code, InteractionRequiredAuthErrorMessage.native_account_unavailable.desc);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,IAAA,qCAAqC,GAAG;IACjD,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;EAClB;AAEW,IAAA,sCAAsC,GAAG;IAClD,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,uBAAuB;IACvB,kBAAkB;EACpB;AAEF;;AAEG;AACU,IAAA,mCAAmC,GAAG;AAC/C,IAAA,kBAAkB,EAAE;AAChB,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,IAAI,EAAE,sDAAsD;AAC/D,KAAA;AACD,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,qJAAqJ;AAC9J,KAAA;EACH;AAEF;;AAEG;AACH,IAAA,4BAAA,kBAAA,UAAA,MAAA,EAAA;IAAkD,SAAS,CAAA,4BAAA,EAAA,MAAA,CAAA,CAAA;AAEvD,IAAA,SAAA,4BAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;AAAxE,QAAA,IAAA,KAAA,GACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,IAI3C,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAE3C,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;;KACvE;AAED;;;;;AAKG;AACI,IAAA,4BAAA,CAAA,0BAA0B,GAAjC,UAAkC,SAAkB,EAAE,WAAoB,EAAE,QAAiB,EAAA;AACzF,QAAA,IAAM,8BAA8B,GAAG,CAAC,CAAC,SAAS,IAAI,qCAAqC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACpH,QAAA,IAAM,6BAA6B,GAAG,CAAC,CAAC,QAAQ,IAAI,sCAAsC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAClH,IAAM,8BAA8B,GAAG,CAAC,CAAC,WAAW,IAAI,qCAAqC,CAAC,IAAI,CAAC,UAAC,WAAW,EAAA;YAC3G,OAAO,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC;AAEH,QAAA,OAAO,8BAA8B,IAAI,8BAA8B,IAAI,6BAA6B,CAAC;KAC5G,CAAA;AAED;;AAEG;AACI,IAAA,4BAAA,CAAA,wBAAwB,GAA/B,YAAA;AACI,QAAA,OAAO,IAAI,4BAA4B,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,IAAI,EAAE,mCAAmC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KACrK,CAAA;AAED;;;AAGG;AACI,IAAA,4BAAA,CAAA,mCAAmC,GAA1C,YAAA;AACI,QAAA,OAAO,IAAI,4BAA4B,CAAC,mCAAmC,CAAC,0BAA0B,CAAC,IAAI,EAAE,mCAAmC,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;KACrL,CAAA;IACL,OAAC,4BAAA,CAAA;AAAD,CAvCA,CAAkD,SAAS,CAuC1D;;;;"}
1
+ {"version":3,"file":"InteractionRequiredAuthError.js","sources":["../../src/error/InteractionRequiredAuthError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"./AuthError\";\r\n\r\n/**\r\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\r\n */\r\nexport const InteractionRequiredServerErrorMessage = [\r\n \"interaction_required\",\r\n \"consent_required\",\r\n \"login_required\"\r\n];\r\n\r\nexport const InteractionRequiredAuthSubErrorMessage = [\r\n \"message_only\",\r\n \"additional_action\",\r\n \"basic_action\",\r\n \"user_password_expired\",\r\n \"consent_required\"\r\n];\r\n\r\n/**\r\n * Interaction required errors defined by the SDK\r\n */\r\nexport const InteractionRequiredAuthErrorMessage = {\r\n noTokensFoundError: {\r\n code: \"no_tokens_found\",\r\n desc: \"No refresh token found in the cache. Please sign-in.\"\r\n },\r\n native_account_unavailable: {\r\n code: \"native_account_unavailable\",\r\n desc: \"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.\"\r\n }\r\n};\r\n\r\n/**\r\n * Error thrown when user interaction is required.\r\n */\r\nexport class InteractionRequiredAuthError extends AuthError {\r\n\r\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\r\n super(errorCode, errorMessage, subError);\r\n this.name = \"InteractionRequiredAuthError\";\r\n\r\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\r\n }\r\n\r\n /**\r\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\r\n * @param errorCode \r\n * @param errorString \r\n * @param subError \r\n */\r\n static isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string): boolean {\r\n const isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\r\n const isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\r\n const isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredServerErrorMessage.some((irErrorCode) => {\r\n return errorString.indexOf(irErrorCode) > -1;\r\n });\r\n\r\n return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the authorization code required for a token request is null or empty.\r\n */\r\n static createNoTokensFoundError(): InteractionRequiredAuthError {\r\n return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.noTokensFoundError.code, InteractionRequiredAuthErrorMessage.noTokensFoundError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when the native broker returns ACCOUNT_UNAVAILABLE status, indicating that the account was removed and interactive sign-in is required\r\n * @returns \r\n */\r\n static createNativeAccountUnavailableError(): InteractionRequiredAuthError {\r\n return new InteractionRequiredAuthError(InteractionRequiredAuthErrorMessage.native_account_unavailable.code, InteractionRequiredAuthErrorMessage.native_account_unavailable.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,IAAA,qCAAqC,GAAG;IACjD,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;EAClB;AAEW,IAAA,sCAAsC,GAAG;IAClD,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,uBAAuB;IACvB,kBAAkB;EACpB;AAEF;;AAEG;AACU,IAAA,mCAAmC,GAAG;AAC/C,IAAA,kBAAkB,EAAE;AAChB,QAAA,IAAI,EAAE,iBAAiB;AACvB,QAAA,IAAI,EAAE,sDAAsD;AAC/D,KAAA;AACD,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,qJAAqJ;AAC9J,KAAA;EACH;AAEF;;AAEG;AACH,IAAA,4BAAA,kBAAA,UAAA,MAAA,EAAA;IAAkD,SAAS,CAAA,4BAAA,EAAA,MAAA,CAAA,CAAA;AAEvD,IAAA,SAAA,4BAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;AAAxE,QAAA,IAAA,KAAA,GACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,IAI3C,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAE3C,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;;KACvE;AAED;;;;;AAKG;AACI,IAAA,4BAAA,CAAA,0BAA0B,GAAjC,UAAkC,SAAkB,EAAE,WAAoB,EAAE,QAAiB,EAAA;AACzF,QAAA,IAAM,8BAA8B,GAAG,CAAC,CAAC,SAAS,IAAI,qCAAqC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACpH,QAAA,IAAM,6BAA6B,GAAG,CAAC,CAAC,QAAQ,IAAI,sCAAsC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAClH,IAAM,8BAA8B,GAAG,CAAC,CAAC,WAAW,IAAI,qCAAqC,CAAC,IAAI,CAAC,UAAC,WAAW,EAAA;YAC3G,OAAO,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC;AAEH,QAAA,OAAO,8BAA8B,IAAI,8BAA8B,IAAI,6BAA6B,CAAC;KAC5G,CAAA;AAED;;AAEG;AACI,IAAA,4BAAA,CAAA,wBAAwB,GAA/B,YAAA;AACI,QAAA,OAAO,IAAI,4BAA4B,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,IAAI,EAAE,mCAAmC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KACrK,CAAA;AAED;;;AAGG;AACI,IAAA,4BAAA,CAAA,mCAAmC,GAA1C,YAAA;AACI,QAAA,OAAO,IAAI,4BAA4B,CAAC,mCAAmC,CAAC,0BAA0B,CAAC,IAAI,EAAE,mCAAmC,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;KACrL,CAAA;IACL,OAAC,4BAAA,CAAA;AAAD,CAvCA,CAAkD,SAAS,CAuC1D;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from './AuthError.js';
@@ -1 +1 @@
1
- {"version":3,"file":"JoseHeaderError.js","sources":["../../src/error/JoseHeaderError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * ClientAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const JoseHeaderErrorMessage = {\n missingKidError: {\n code: \"missing_kid_error\",\n desc: \"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.\"\n },\n missingAlgError: {\n code: \"missing_alg_error\",\n desc: \"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.\"\n },\n};\n\n/**\n * Error thrown when there is an error in the client code running on the browser.\n */\nexport class JoseHeaderError extends AuthError {\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"JoseHeaderError\";\n\n Object.setPrototypeOf(this, JoseHeaderError.prototype);\n }\n\n /**\n * Creates an error thrown when keyId isn't set on JOSE header.\n */\n static createMissingKidError(): JoseHeaderError {\n return new JoseHeaderError(JoseHeaderErrorMessage.missingKidError.code, JoseHeaderErrorMessage.missingKidError.desc);\n }\n\n /**\n * Creates an error thrown when algorithm isn't set on JOSE header.\n */\n static createMissingAlgError(): JoseHeaderError {\n return new JoseHeaderError(JoseHeaderErrorMessage.missingAlgError.code, JoseHeaderErrorMessage.missingAlgError.desc);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,IAAA,sBAAsB,GAAG;AAClC,IAAA,eAAe,EAAE;AACb,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,IAAI,EAAE,oJAAoJ;AAC7J,KAAA;AACD,IAAA,eAAe,EAAE;AACb,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,IAAI,EAAE,wJAAwJ;AACjK,KAAA;EACH;AAEF;;AAEG;AACH,IAAA,eAAA,kBAAA,UAAA,MAAA,EAAA;IAAqC,SAAS,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA;IAC1C,SAAY,eAAA,CAAA,SAAiB,EAAE,YAAqB,EAAA;AAApD,QAAA,IAAA,KAAA,GACI,MAAM,CAAA,IAAA,CAAA,IAAA,EAAA,SAAS,EAAE,YAAY,CAAC,IAIjC,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;;KAC1D;AAED;;AAEG;AACI,IAAA,eAAA,CAAA,qBAAqB,GAA5B,YAAA;AACI,QAAA,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,IAAI,EAAE,sBAAsB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KACxH,CAAA;AAED;;AAEG;AACI,IAAA,eAAA,CAAA,qBAAqB,GAA5B,YAAA;AACI,QAAA,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,IAAI,EAAE,sBAAsB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KACxH,CAAA;IACL,OAAC,eAAA,CAAA;AAAD,CArBA,CAAqC,SAAS,CAqB7C;;;;"}
1
+ {"version":3,"file":"JoseHeaderError.js","sources":["../../src/error/JoseHeaderError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"./AuthError\";\r\n\r\n/**\r\n * ClientAuthErrorMessage class containing string constants used by error codes and messages.\r\n */\r\nexport const JoseHeaderErrorMessage = {\r\n missingKidError: {\r\n code: \"missing_kid_error\",\r\n desc: \"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.\"\r\n },\r\n missingAlgError: {\r\n code: \"missing_alg_error\",\r\n desc: \"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.\"\r\n },\r\n};\r\n\r\n/**\r\n * Error thrown when there is an error in the client code running on the browser.\r\n */\r\nexport class JoseHeaderError extends AuthError {\r\n constructor(errorCode: string, errorMessage?: string) {\r\n super(errorCode, errorMessage);\r\n this.name = \"JoseHeaderError\";\r\n\r\n Object.setPrototypeOf(this, JoseHeaderError.prototype);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when keyId isn't set on JOSE header.\r\n */\r\n static createMissingKidError(): JoseHeaderError {\r\n return new JoseHeaderError(JoseHeaderErrorMessage.missingKidError.code, JoseHeaderErrorMessage.missingKidError.desc);\r\n }\r\n\r\n /**\r\n * Creates an error thrown when algorithm isn't set on JOSE header.\r\n */\r\n static createMissingAlgError(): JoseHeaderError {\r\n return new JoseHeaderError(JoseHeaderErrorMessage.missingAlgError.code, JoseHeaderErrorMessage.missingAlgError.desc);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,IAAA,sBAAsB,GAAG;AAClC,IAAA,eAAe,EAAE;AACb,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,IAAI,EAAE,oJAAoJ;AAC7J,KAAA;AACD,IAAA,eAAe,EAAE;AACb,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,IAAI,EAAE,wJAAwJ;AACjK,KAAA;EACH;AAEF;;AAEG;AACH,IAAA,eAAA,kBAAA,UAAA,MAAA,EAAA;IAAqC,SAAS,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA;IAC1C,SAAY,eAAA,CAAA,SAAiB,EAAE,YAAqB,EAAA;AAApD,QAAA,IAAA,KAAA,GACI,MAAM,CAAA,IAAA,CAAA,IAAA,EAAA,SAAS,EAAE,YAAY,CAAC,IAIjC,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;;KAC1D;AAED;;AAEG;AACI,IAAA,eAAA,CAAA,qBAAqB,GAA5B,YAAA;AACI,QAAA,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,IAAI,EAAE,sBAAsB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KACxH,CAAA;AAED;;AAEG;AACI,IAAA,eAAA,CAAA,qBAAqB,GAA5B,YAAA;AACI,QAAA,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,eAAe,CAAC,IAAI,EAAE,sBAAsB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KACxH,CAAA;IACL,OAAC,eAAA,CAAA;AAAD,CArBA,CAAqC,SAAS,CAqB7C;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from './AuthError.js';
@@ -1 +1 @@
1
- {"version":3,"file":"ServerError.js","sources":["../../src/error/ServerError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * Error thrown when there is an error with the server code, for example, unavailability.\n */\nexport class ServerError extends AuthError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"ServerError\";\n\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACH,IAAA,WAAA,kBAAA,UAAA,MAAA,EAAA;IAAiC,SAAS,CAAA,WAAA,EAAA,MAAA,CAAA,CAAA;AAEtC,IAAA,SAAA,WAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;AAAxE,QAAA,IAAA,KAAA,GACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,IAI3C,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAE1B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;;KACtD;IACL,OAAC,WAAA,CAAA;AAAD,CARA,CAAiC,SAAS,CAQzC;;;;"}
1
+ {"version":3,"file":"ServerError.js","sources":["../../src/error/ServerError.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthError } from \"./AuthError\";\r\n\r\n/**\r\n * Error thrown when there is an error with the server code, for example, unavailability.\r\n */\r\nexport class ServerError extends AuthError {\r\n\r\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\r\n super(errorCode, errorMessage, subError);\r\n this.name = \"ServerError\";\r\n\r\n Object.setPrototypeOf(this, ServerError.prototype);\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AAIH;;AAEG;AACH,IAAA,WAAA,kBAAA,UAAA,MAAA,EAAA;IAAiC,SAAS,CAAA,WAAA,EAAA,MAAA,CAAA,CAAA;AAEtC,IAAA,SAAA,WAAA,CAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB,EAAA;AAAxE,QAAA,IAAA,KAAA,GACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,IAI3C,IAAA,CAAA;AAHG,QAAA,KAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAE1B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;;KACtD;IACL,OAAC,WAAA,CAAA;AAAD,CARA,CAAiC,SAAS,CAQzC;;;;"}
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v9.0.1 2022-12-07 */
1
+ /*! @azure/msal-common v9.0.3 2023-03-10 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -164,6 +164,7 @@ exports.HeaderNames = void 0;
164
164
  HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
165
165
  HeaderNames["AuthenticationInfo"] = "Authentication-Info";
166
166
  HeaderNames["X_MS_REQUEST_ID"] = "x-ms-request-id";
167
+ HeaderNames["X_MS_HTTP_VERSION"] = "x-ms-httpver";
167
168
  })(exports.HeaderNames || (exports.HeaderNames = {}));
168
169
  /**
169
170
  * Persistent cache keys MSAL which stay while user is logged in.
@@ -485,6 +486,7 @@ var JsonTypes;
485
486
  (function (JsonTypes) {
486
487
  JsonTypes["Jwt"] = "JWT";
487
488
  JsonTypes["Jwk"] = "JWK";
489
+ JsonTypes["Pop"] = "pop";
488
490
  })(JsonTypes || (JsonTypes = {}));
489
491
  var ONE_DAY_IN_MS = 86400000;
490
492
 
@@ -1256,13 +1258,23 @@ var Logger = /** @class */ (function () {
1256
1258
  var defaultLoggerCallback = function () {
1257
1259
  return;
1258
1260
  };
1259
- this.localCallback = loggerOptions.loggerCallback || defaultLoggerCallback;
1260
- this.piiLoggingEnabled = loggerOptions.piiLoggingEnabled || false;
1261
- this.level = typeof (loggerOptions.logLevel) === "number" ? loggerOptions.logLevel : exports.LogLevel.Info;
1262
- this.correlationId = loggerOptions.correlationId || Constants.EMPTY_STRING;
1261
+ var setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();
1262
+ this.localCallback = setLoggerOptions.loggerCallback || defaultLoggerCallback;
1263
+ this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;
1264
+ this.level = typeof (setLoggerOptions.logLevel) === "number" ? setLoggerOptions.logLevel : exports.LogLevel.Info;
1265
+ this.correlationId = setLoggerOptions.correlationId || Constants.EMPTY_STRING;
1263
1266
  this.packageName = packageName || Constants.EMPTY_STRING;
1264
1267
  this.packageVersion = packageVersion || Constants.EMPTY_STRING;
1265
1268
  }
1269
+ Logger.createDefaultLoggerOptions = function () {
1270
+ return {
1271
+ loggerCallback: function () {
1272
+ // allow users to not set loggerCallback
1273
+ },
1274
+ piiLoggingEnabled: false,
1275
+ logLevel: exports.LogLevel.Info
1276
+ };
1277
+ };
1266
1278
  /**
1267
1279
  * Create new Logger with existing configurations.
1268
1280
  */
@@ -1411,7 +1423,7 @@ var Logger = /** @class */ (function () {
1411
1423
 
1412
1424
  /* eslint-disable header/header */
1413
1425
  var name = "@azure/msal-common";
1414
- var version = "9.0.1";
1426
+ var version = "9.0.3";
1415
1427
 
1416
1428
  /*
1417
1429
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1508,19 +1520,16 @@ var CredentialEntity = /** @class */ (function () {
1508
1520
  * @param key
1509
1521
  */
1510
1522
  CredentialEntity.getCredentialType = function (key) {
1511
- // First keyword search will match all "AccessToken" and "AccessToken_With_AuthScheme" credentials
1512
- if (key.indexOf(exports.CredentialType.ACCESS_TOKEN.toLowerCase()) !== -1) {
1513
- // Perform second search to differentiate between "AccessToken" and "AccessToken_With_AuthScheme" credential types
1514
- if (key.indexOf(exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) !== -1) {
1515
- return exports.CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME;
1523
+ var separator = Separators.CACHE_KEY_SEPARATOR;
1524
+ // Match host names like "login.microsoftonline.com", "https://accounts.google.com:4000", etc.
1525
+ var domainRe = "(https?:\\/\\/)?([\\w-]+\\.)*([\\w-]{1,63})(\\.(\\w{2,3}))(\\:[0-9]{4,5})?";
1526
+ for (var _i = 0, _a = Object.keys(exports.CredentialType); _i < _a.length; _i++) {
1527
+ var credKey = _a[_i];
1528
+ var credVal = exports.CredentialType[credKey].toLowerCase();
1529
+ // Verify credential type is preceded by a valid host name (environment)
1530
+ if (key.toLowerCase().search("(?<=" + separator + domainRe + ")" + separator + credVal + separator) !== -1) {
1531
+ return exports.CredentialType[credKey];
1516
1532
  }
1517
- return exports.CredentialType.ACCESS_TOKEN;
1518
- }
1519
- else if (key.indexOf(exports.CredentialType.ID_TOKEN.toLowerCase()) !== -1) {
1520
- return exports.CredentialType.ID_TOKEN;
1521
- }
1522
- else if (key.indexOf(exports.CredentialType.REFRESH_TOKEN.toLowerCase()) !== -1) {
1523
- return exports.CredentialType.REFRESH_TOKEN;
1524
1533
  }
1525
1534
  return Constants.NOT_DEFINED;
1526
1535
  };
@@ -5197,7 +5206,7 @@ var ResponseHandler = /** @class */ (function () {
5197
5206
  cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,
5198
5207
  msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING,
5199
5208
  code: code,
5200
- fromNativeBroker: false
5209
+ fromNativeBroker: false,
5201
5210
  }];
5202
5211
  }
5203
5212
  });
@@ -5215,8 +5224,8 @@ var ResponseHandler = /** @class */ (function () {
5215
5224
  */
5216
5225
  var AuthorizationCodeClient = /** @class */ (function (_super) {
5217
5226
  __extends(AuthorizationCodeClient, _super);
5218
- function AuthorizationCodeClient(configuration) {
5219
- var _this = _super.call(this, configuration) || this;
5227
+ function AuthorizationCodeClient(configuration, performanceClient) {
5228
+ var _this = _super.call(this, configuration, performanceClient) || this;
5220
5229
  // Flag to indicate if client is for hybrid spa auth code redemption
5221
5230
  _this.includeRedirectUri = true;
5222
5231
  return _this;
@@ -5250,26 +5259,47 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5250
5259
  * @param request
5251
5260
  */
5252
5261
  AuthorizationCodeClient.prototype.acquireToken = function (request, authCodePayload) {
5253
- var _a;
5262
+ var _a, _b, _c;
5254
5263
  return __awaiter(this, void 0, void 0, function () {
5255
- var reqTimestamp, response, requestId, responseHandler;
5256
- return __generator(this, function (_b) {
5257
- switch (_b.label) {
5264
+ var atsMeasurement, reqTimestamp, response, requestId, httpVerAuthority, responseHandler;
5265
+ var _this = this;
5266
+ return __generator(this, function (_d) {
5267
+ switch (_d.label) {
5258
5268
  case 0:
5259
- this.logger.info("in acquireToken call");
5269
+ atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("AuthCodeClientAcquireToken", request.correlationId);
5270
+ this.logger.info("in acquireToken call in auth-code client");
5260
5271
  if (!request || StringUtils.isEmpty(request.code)) {
5261
5272
  throw ClientAuthError.createTokenRequestCannotBeMadeError();
5262
5273
  }
5263
5274
  reqTimestamp = TimeUtils.nowSeconds();
5264
5275
  return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
5265
5276
  case 1:
5266
- response = _b.sent();
5267
- requestId = (_a = response.headers) === null || _a === void 0 ? void 0 : _a[exports.HeaderNames.X_MS_REQUEST_ID];
5277
+ response = _d.sent();
5278
+ requestId = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[exports.HeaderNames.X_MS_REQUEST_ID];
5279
+ httpVerAuthority = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[exports.HeaderNames.X_MS_HTTP_VERSION];
5280
+ if (httpVerAuthority) {
5281
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
5282
+ httpVerAuthority: httpVerAuthority
5283
+ });
5284
+ }
5268
5285
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
5269
5286
  // Validate response. This function throws a server error if an error is returned by the server.
5270
5287
  responseHandler.validateTokenResponse(response.body);
5271
- return [4 /*yield*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId)];
5272
- case 2: return [2 /*return*/, _b.sent()];
5288
+ return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId).then(function (result) {
5289
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5290
+ success: true
5291
+ });
5292
+ return result;
5293
+ })
5294
+ .catch(function (error) {
5295
+ _this.logger.verbose("Error in fetching token in ACC", request.correlationId);
5296
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
5297
+ errorCode: error.errorCode,
5298
+ subErrorCode: error.subError,
5299
+ success: false
5300
+ });
5301
+ throw error;
5302
+ })];
5273
5303
  }
5274
5304
  });
5275
5305
  });
@@ -5985,6 +6015,11 @@ exports.PerformanceEvents = void 0;
5985
6015
  * Time taken for acquiring cached refresh token
5986
6016
  */
5987
6017
  PerformanceEvents["RefreshTokenClientAcquireTokenWithCachedRefreshToken"] = "refreshTokenClientAcquireTokenWithCachedRefreshToken";
6018
+ PerformanceEvents["GetEndpointMetadataFromNetwork"] = "getEndpointMetadataFromNetwork";
6019
+ PerformanceEvents["GetCloudDiscoveryMetadataFromNetworkMeasurement"] = "getCloudDiscoveryMetadataFromNetworkMeasurement";
6020
+ PerformanceEvents["HandleRedirectPromiseMeasurement"] = "handleRedirectPromiseMeasurement";
6021
+ PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
6022
+ PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5988
6023
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5989
6024
  /**
5990
6025
  * State of the performance event.
@@ -6012,23 +6047,29 @@ var RefreshTokenClient = /** @class */ (function (_super) {
6012
6047
  return _super.call(this, configuration, performanceClient) || this;
6013
6048
  }
6014
6049
  RefreshTokenClient.prototype.acquireToken = function (request) {
6015
- var _a, _b, _c;
6050
+ var _a, _b, _c, _d;
6016
6051
  return __awaiter(this, void 0, void 0, function () {
6017
- var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
6052
+ var atsMeasurement, reqTimestamp, response, httpVerToken, requestId, responseHandler;
6018
6053
  var _this = this;
6019
- return __generator(this, function (_d) {
6020
- switch (_d.label) {
6054
+ return __generator(this, function (_e) {
6055
+ switch (_e.label) {
6021
6056
  case 0:
6022
6057
  atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
6023
6058
  this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
6024
6059
  reqTimestamp = TimeUtils.nowSeconds();
6025
6060
  return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
6026
6061
  case 1:
6027
- response = _d.sent();
6062
+ response = _e.sent();
6063
+ httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[exports.HeaderNames.X_MS_HTTP_VERSION];
6028
6064
  atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6029
- refreshTokenSize: ((_b = response.body.refresh_token) === null || _b === void 0 ? void 0 : _b.length) || 0
6065
+ refreshTokenSize: ((_c = response.body.refresh_token) === null || _c === void 0 ? void 0 : _c.length) || 0,
6030
6066
  });
6031
- requestId = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[exports.HeaderNames.X_MS_REQUEST_ID];
6067
+ if (httpVerToken) {
6068
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6069
+ httpVerToken: httpVerToken,
6070
+ });
6071
+ }
6072
+ requestId = (_d = response.headers) === null || _d === void 0 ? void 0 : _d[exports.HeaderNames.X_MS_REQUEST_ID];
6032
6073
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
6033
6074
  responseHandler.validateTokenResponse(response.body);
6034
6075
  return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
@@ -6821,16 +6862,22 @@ var UsernamePasswordClient = /** @class */ (function (_super) {
6821
6862
  * @param request
6822
6863
  */
6823
6864
  UsernamePasswordClient.prototype.acquireToken = function (request) {
6865
+ var _a, _b;
6824
6866
  return __awaiter(this, void 0, void 0, function () {
6825
- var reqTimestamp, response, responseHandler, tokenResponse;
6826
- return __generator(this, function (_a) {
6827
- switch (_a.label) {
6867
+ var atsMeasurement, reqTimestamp, response, httpVerToken, responseHandler, tokenResponse;
6868
+ return __generator(this, function (_c) {
6869
+ switch (_c.label) {
6828
6870
  case 0:
6829
- this.logger.info("in acquireToken call");
6871
+ atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("UsernamePasswordClientAcquireToken", request.correlationId);
6872
+ this.logger.info("in acquireToken call in username-password client");
6830
6873
  reqTimestamp = TimeUtils.nowSeconds();
6831
6874
  return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
6832
6875
  case 1:
6833
- response = _a.sent();
6876
+ response = _c.sent();
6877
+ httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[exports.HeaderNames.X_MS_HTTP_VERSION];
6878
+ atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
6879
+ httpVerToken: httpVerToken
6880
+ });
6834
6881
  responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
6835
6882
  // Validate response. This function throws a server error if an error is returned by the server.
6836
6883
  responseHandler.validateTokenResponse(response.body);
@@ -8074,8 +8121,8 @@ var JoseHeader = /** @class */ (function () {
8074
8121
  throw JoseHeaderError.createMissingAlgError();
8075
8122
  }
8076
8123
  var shrHeader = new JoseHeader({
8077
- // Access Token PoP headers must have type JWT, but the type header can be overriden for special cases
8078
- typ: shrHeaderOptions.typ || JsonTypes.Jwt,
8124
+ // Access Token PoP headers must have type pop, but the type header can be overriden for special cases
8125
+ typ: shrHeaderOptions.typ || JsonTypes.Pop,
8079
8126
  kid: shrHeaderOptions.kid,
8080
8127
  alg: shrHeaderOptions.alg
8081
8128
  });
@@ -8345,7 +8392,7 @@ var PerformanceClient = /** @class */ (function () {
8345
8392
  this.logger.info("PerformanceClient: No correlation id provided for " + measureName + ", generating", eventCorrelationId);
8346
8393
  }
8347
8394
  this.logger.trace("PerformanceClient: Performance measurement started for " + measureName, eventCorrelationId);
8348
- var performanceMeasurement = this.startPerformanceMeasuremeant(measureName, eventCorrelationId);
8395
+ var performanceMeasurement = this.startPerformanceMeasurement(measureName, eventCorrelationId);
8349
8396
  performanceMeasurement.startMeasurement();
8350
8397
  var inProgressEvent = {
8351
8398
  eventId: this.generateId(),
@@ -8618,7 +8665,7 @@ var StubPerformanceClient = /** @class */ (function (_super) {
8618
8665
  StubPerformanceClient.prototype.generateId = function () {
8619
8666
  return "callback-id";
8620
8667
  };
8621
- StubPerformanceClient.prototype.startPerformanceMeasuremeant = function () {
8668
+ StubPerformanceClient.prototype.startPerformanceMeasurement = function () {
8622
8669
  return new StubPerformanceMeasurement();
8623
8670
  };
8624
8671
  return StubPerformanceClient;