@azure/msal-browser 5.0.2 → 5.1.0

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 (405) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  7. package/dist/cache/AccountManager.mjs +1 -1
  8. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  9. package/dist/cache/BrowserCacheManager.d.ts +2 -2
  10. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  11. package/dist/cache/BrowserCacheManager.mjs +14 -9
  12. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  13. package/dist/cache/CacheHelpers.mjs +1 -1
  14. package/dist/cache/CacheKeys.mjs +1 -1
  15. package/dist/cache/CookieStorage.mjs +1 -1
  16. package/dist/cache/DatabaseStorage.mjs +1 -1
  17. package/dist/cache/EncryptedData.mjs +1 -1
  18. package/dist/cache/LocalStorage.mjs +1 -1
  19. package/dist/cache/MemoryStorage.mjs +1 -1
  20. package/dist/cache/SessionStorage.mjs +1 -1
  21. package/dist/cache/TokenCache.d.ts.map +1 -1
  22. package/dist/cache/TokenCache.mjs +24 -18
  23. package/dist/cache/TokenCache.mjs.map +1 -1
  24. package/dist/config/Configuration.mjs +1 -1
  25. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  26. package/dist/controllers/NestedAppAuthController.mjs +3 -3
  27. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  28. package/dist/controllers/StandardController.d.ts.map +1 -1
  29. package/dist/controllers/StandardController.mjs +2 -2
  30. package/dist/controllers/StandardController.mjs.map +1 -1
  31. package/dist/crypto/BrowserCrypto.mjs +1 -1
  32. package/dist/crypto/CryptoOps.mjs +1 -1
  33. package/dist/crypto/PkceGenerator.mjs +1 -1
  34. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  35. package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
  36. package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  37. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  38. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  39. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  40. package/dist/custom-auth-path/cache/AccountManager.mjs +1 -1
  41. package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
  42. package/dist/custom-auth-path/cache/BrowserCacheManager.d.ts +2 -2
  43. package/dist/custom-auth-path/cache/BrowserCacheManager.d.ts.map +1 -1
  44. package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +14 -9
  45. package/dist/custom-auth-path/cache/BrowserCacheManager.mjs.map +1 -1
  46. package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
  47. package/dist/custom-auth-path/cache/CacheKeys.mjs +1 -1
  48. package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
  49. package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
  50. package/dist/custom-auth-path/cache/EncryptedData.mjs +1 -1
  51. package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
  52. package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
  53. package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
  54. package/dist/custom-auth-path/cache/TokenCache.d.ts.map +1 -1
  55. package/dist/custom-auth-path/config/Configuration.mjs +1 -1
  56. package/dist/custom-auth-path/controllers/NestedAppAuthController.d.ts.map +1 -1
  57. package/dist/custom-auth-path/controllers/StandardController.d.ts.map +1 -1
  58. package/dist/custom-auth-path/controllers/StandardController.mjs +2 -2
  59. package/dist/custom-auth-path/controllers/StandardController.mjs.map +1 -1
  60. package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
  61. package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
  62. package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
  63. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
  64. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
  65. package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  66. package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  67. package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  68. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  69. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  70. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  71. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  72. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  73. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  74. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  75. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  76. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  77. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  78. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  79. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  80. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  81. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  82. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  83. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  84. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  85. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
  86. package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
  87. package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  88. package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  89. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  90. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  91. package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  92. package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  93. package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  94. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  95. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  96. package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
  97. package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  98. package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  99. package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  100. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
  101. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
  102. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +3 -3
  103. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs.map +1 -1
  104. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  105. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
  106. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.mjs +3 -3
  107. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.mjs.map +1 -1
  108. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  109. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
  110. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.mjs +3 -3
  111. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.mjs.map +1 -1
  112. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  113. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  114. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  115. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  116. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  117. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  118. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  119. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  120. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  121. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  122. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  123. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  124. package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  125. package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  126. package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
  127. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  128. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  129. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  130. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  131. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  132. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  133. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  134. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  135. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  136. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -2
  137. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
  138. package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
  139. package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  140. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  141. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  142. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  143. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  144. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  145. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  146. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  147. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  148. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  149. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  150. package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  151. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  152. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  153. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  154. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  155. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  156. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  157. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  158. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  159. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  160. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  161. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  162. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  163. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
  164. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +7 -7
  165. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
  166. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  167. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  168. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  169. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  170. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  171. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  172. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  173. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  174. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  175. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  176. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  177. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  178. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  179. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  180. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  181. package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
  182. package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
  183. package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
  184. package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
  185. package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
  186. package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  187. package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
  188. package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
  189. package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
  190. package/dist/custom-auth-path/event/EventType.mjs +1 -1
  191. package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
  192. package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  193. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  194. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +3 -3
  195. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  196. package/dist/custom-auth-path/interaction_client/PopupClient.mjs +1 -1
  197. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +1 -1
  198. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  199. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +2 -2
  200. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  201. package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
  202. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +1 -1
  203. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  204. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +2 -2
  205. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs.map +1 -1
  206. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +1 -1
  207. package/dist/custom-auth-path/interaction_handler/InteractionHandler.d.ts +3 -2
  208. package/dist/custom-auth-path/interaction_handler/InteractionHandler.d.ts.map +1 -1
  209. package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +5 -5
  210. package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs.map +1 -1
  211. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +1 -1
  212. package/dist/custom-auth-path/log-strings-mapping.json +2 -2
  213. package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
  214. package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
  215. package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
  216. package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
  217. package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
  218. package/dist/custom-auth-path/packageMetadata.mjs +2 -2
  219. package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
  220. package/dist/custom-auth-path/protocol/Authorize.mjs +3 -3
  221. package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
  222. package/dist/custom-auth-path/request/RequestHelpers.mjs +1 -1
  223. package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
  224. package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.mjs +1 -1
  225. package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  226. package/dist/custom-auth-path/utils/BrowserConstants.d.ts +20 -0
  227. package/dist/custom-auth-path/utils/BrowserConstants.d.ts.map +1 -1
  228. package/dist/custom-auth-path/utils/BrowserConstants.mjs +27 -2
  229. package/dist/custom-auth-path/utils/BrowserConstants.mjs.map +1 -1
  230. package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
  231. package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
  232. package/dist/custom-auth-path/utils/Helpers.mjs +1 -1
  233. package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
  234. package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
  235. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
  236. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
  237. package/dist/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
  238. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
  239. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  240. package/dist/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
  241. package/dist/encode/Base64Decode.mjs +1 -1
  242. package/dist/encode/Base64Encode.mjs +1 -1
  243. package/dist/error/BrowserAuthError.mjs +1 -1
  244. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  245. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  246. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  247. package/dist/error/NativeAuthError.mjs +1 -1
  248. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  249. package/dist/error/NestedAppAuthError.mjs +1 -1
  250. package/dist/event/EventHandler.mjs +1 -1
  251. package/dist/event/EventMessage.mjs +1 -1
  252. package/dist/event/EventType.mjs +1 -1
  253. package/dist/index.mjs +1 -1
  254. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  255. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  256. package/dist/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  257. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +3 -3
  258. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  259. package/dist/interaction_client/PopupClient.mjs +1 -1
  260. package/dist/interaction_client/RedirectClient.mjs +1 -1
  261. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  262. package/dist/interaction_client/SilentAuthCodeClient.mjs +2 -2
  263. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  264. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  265. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  266. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  267. package/dist/interaction_client/SilentRefreshClient.mjs +2 -2
  268. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  269. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  270. package/dist/interaction_handler/InteractionHandler.d.ts +3 -2
  271. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  272. package/dist/interaction_handler/InteractionHandler.mjs +5 -5
  273. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  274. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  275. package/dist/log-strings-mapping.json +4 -4
  276. package/dist/naa/BridgeError.mjs +1 -1
  277. package/dist/naa/BridgeProxy.mjs +1 -1
  278. package/dist/naa/BridgeStatusCode.mjs +1 -1
  279. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  280. package/dist/navigation/NavigationClient.mjs +1 -1
  281. package/dist/network/FetchClient.mjs +1 -1
  282. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  283. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  284. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  285. package/dist/packageMetadata.d.ts +1 -1
  286. package/dist/packageMetadata.mjs +2 -2
  287. package/dist/protocol/Authorize.d.ts.map +1 -1
  288. package/dist/protocol/Authorize.mjs +3 -3
  289. package/dist/protocol/Authorize.mjs.map +1 -1
  290. package/dist/redirect-bridge/cache/BrowserCacheManager.d.ts +2 -2
  291. package/dist/redirect-bridge/cache/BrowserCacheManager.d.ts.map +1 -1
  292. package/dist/redirect-bridge/cache/CacheKeys.mjs +1 -1
  293. package/dist/redirect-bridge/cache/TokenCache.d.ts.map +1 -1
  294. package/dist/redirect-bridge/config/Configuration.mjs +1 -1
  295. package/dist/redirect-bridge/controllers/NestedAppAuthController.d.ts.map +1 -1
  296. package/dist/redirect-bridge/controllers/StandardController.d.ts.map +1 -1
  297. package/dist/redirect-bridge/custom_auth/CustomAuthConstants.d.ts +1 -1
  298. package/dist/redirect-bridge/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
  299. package/dist/redirect-bridge/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
  300. package/dist/redirect-bridge/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
  301. package/dist/redirect-bridge/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
  302. package/dist/redirect-bridge/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  303. package/dist/redirect-bridge/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
  304. package/dist/redirect-bridge/encode/Base64Decode.mjs +1 -1
  305. package/dist/redirect-bridge/error/BrowserAuthError.mjs +1 -1
  306. package/dist/redirect-bridge/error/BrowserAuthErrorCodes.mjs +1 -1
  307. package/dist/redirect-bridge/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  308. package/dist/redirect-bridge/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  309. package/dist/redirect-bridge/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  310. package/dist/redirect-bridge/interaction_handler/InteractionHandler.d.ts +3 -2
  311. package/dist/redirect-bridge/interaction_handler/InteractionHandler.d.ts.map +1 -1
  312. package/dist/redirect-bridge/navigation/NavigationClient.mjs +1 -1
  313. package/dist/redirect-bridge/packageMetadata.d.ts +1 -1
  314. package/dist/redirect-bridge/protocol/Authorize.d.ts.map +1 -1
  315. package/dist/redirect-bridge/redirect_bridge/index.mjs +1 -1
  316. package/dist/redirect-bridge/utils/BrowserConstants.d.ts +20 -0
  317. package/dist/redirect-bridge/utils/BrowserConstants.d.ts.map +1 -1
  318. package/dist/redirect-bridge/utils/BrowserConstants.mjs +2 -1
  319. package/dist/redirect-bridge/utils/BrowserConstants.mjs.map +1 -1
  320. package/dist/redirect-bridge/utils/BrowserUtils.mjs +1 -1
  321. package/dist/request/RequestHelpers.mjs +1 -1
  322. package/dist/response/ResponseHandler.mjs +1 -1
  323. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  324. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  325. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  326. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  327. package/dist/utils/BrowserConstants.d.ts +20 -0
  328. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  329. package/dist/utils/BrowserConstants.mjs +27 -2
  330. package/dist/utils/BrowserConstants.mjs.map +1 -1
  331. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  332. package/dist/utils/BrowserUtils.mjs +1 -1
  333. package/dist/utils/Helpers.mjs +1 -1
  334. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  335. package/lib/custom-auth-path/log-strings-mapping.json +2 -2
  336. package/lib/custom-auth-path/msal-custom-auth.cjs +163 -113
  337. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  338. package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts +2 -2
  339. package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts.map +1 -1
  340. package/lib/custom-auth-path/types/cache/TokenCache.d.ts.map +1 -1
  341. package/lib/custom-auth-path/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  342. package/lib/custom-auth-path/types/controllers/StandardController.d.ts.map +1 -1
  343. package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  344. package/lib/custom-auth-path/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
  345. package/lib/custom-auth-path/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
  346. package/lib/custom-auth-path/types/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
  347. package/lib/custom-auth-path/types/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
  348. package/lib/custom-auth-path/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  349. package/lib/custom-auth-path/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
  350. package/lib/custom-auth-path/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  351. package/lib/custom-auth-path/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  352. package/lib/custom-auth-path/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  353. package/lib/custom-auth-path/types/interaction_handler/InteractionHandler.d.ts +3 -2
  354. package/lib/custom-auth-path/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
  355. package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
  356. package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
  357. package/lib/custom-auth-path/types/utils/BrowserConstants.d.ts +20 -0
  358. package/lib/custom-auth-path/types/utils/BrowserConstants.d.ts.map +1 -1
  359. package/lib/log-strings-mapping.json +4 -4
  360. package/lib/msal-browser.cjs +177 -122
  361. package/lib/msal-browser.cjs.map +1 -1
  362. package/lib/msal-browser.js +177 -122
  363. package/lib/msal-browser.js.map +1 -1
  364. package/lib/msal-browser.min.js +2 -2
  365. package/lib/redirect-bridge/msal-redirect-bridge.js +11 -10
  366. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  367. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  368. package/lib/types/cache/BrowserCacheManager.d.ts +2 -2
  369. package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
  370. package/lib/types/cache/TokenCache.d.ts.map +1 -1
  371. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  372. package/lib/types/controllers/StandardController.d.ts.map +1 -1
  373. package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  374. package/lib/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
  375. package/lib/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
  376. package/lib/types/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
  377. package/lib/types/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
  378. package/lib/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  379. package/lib/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
  380. package/lib/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  381. package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  382. package/lib/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  383. package/lib/types/interaction_handler/InteractionHandler.d.ts +3 -2
  384. package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
  385. package/lib/types/packageMetadata.d.ts +1 -1
  386. package/lib/types/protocol/Authorize.d.ts.map +1 -1
  387. package/lib/types/utils/BrowserConstants.d.ts +20 -0
  388. package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
  389. package/package.json +5 -3
  390. package/src/cache/BrowserCacheManager.ts +22 -6
  391. package/src/cache/TokenCache.ts +47 -31
  392. package/src/controllers/NestedAppAuthController.ts +3 -1
  393. package/src/controllers/StandardController.ts +2 -1
  394. package/src/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.ts +4 -2
  395. package/src/custom_auth/core/interaction_client/jit/JitClient.ts +2 -1
  396. package/src/custom_auth/core/interaction_client/mfa/MfaClient.ts +2 -1
  397. package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +2 -1
  398. package/src/custom_auth/sign_in/interaction_client/SignInClient.ts +10 -5
  399. package/src/interaction_client/PlatformAuthInteractionClient.ts +3 -1
  400. package/src/interaction_client/SilentAuthCodeClient.ts +1 -0
  401. package/src/interaction_client/SilentRefreshClient.ts +7 -5
  402. package/src/interaction_handler/InteractionHandler.ts +10 -3
  403. package/src/packageMetadata.ts +1 -1
  404. package/src/protocol/Authorize.ts +2 -1
  405. package/src/utils/BrowserConstants.ts +27 -0
@@ -1,4 +1,5 @@
1
1
  import { AuthorizationCodePayload, CommonAuthorizationCodeRequest, AuthorizationCodeClient, CcsCredential, Logger, IPerformanceClient, AuthorizeResponse, CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
2
+ import { ApiId } from "../utils/BrowserConstants.js";
2
3
  import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
3
4
  import { AuthenticationResult } from "../response/AuthenticationResult.js";
4
5
  /**
@@ -15,7 +16,7 @@ export declare class InteractionHandler {
15
16
  * Function to handle response parameters from hash.
16
17
  * @param locationHash
17
18
  */
18
- handleCodeResponse(response: AuthorizeResponse, request: CommonAuthorizationUrlRequest): Promise<AuthenticationResult>;
19
+ handleCodeResponse(response: AuthorizeResponse, request: CommonAuthorizationUrlRequest, apiId: ApiId): Promise<AuthenticationResult>;
19
20
  /**
20
21
  * Process auth code response from AAD
21
22
  * @param authCodeResponse
@@ -23,7 +24,7 @@ export declare class InteractionHandler {
23
24
  * @param validateNonce
24
25
  * @returns
25
26
  */
26
- handleCodeResponseFromServer(authCodeResponse: AuthorizationCodePayload, request: CommonAuthorizationUrlRequest, validateNonce?: boolean): Promise<AuthenticationResult>;
27
+ handleCodeResponseFromServer(authCodeResponse: AuthorizationCodePayload, request: CommonAuthorizationUrlRequest, apiId: ApiId, validateNonce?: boolean): Promise<AuthenticationResult>;
27
28
  /**
28
29
  * Build ccs creds if available
29
30
  */
@@ -1 +1 @@
1
- {"version":3,"file":"InteractionHandler.d.ts","sourceRoot":"","sources":["../../../src/interaction_handler/InteractionHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,EACvB,aAAa,EACb,MAAM,EAEN,kBAAkB,EAIlB,iBAAiB,EAEjB,6BAA6B,EAChC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,SAAS,CAAC,UAAU,EAAE,uBAAuB,CAAC;IAC9C,SAAS,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC9C,SAAS,CAAC,eAAe,EAAE,8BAA8B,CAAC;IAC1D,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;gBAG5C,cAAc,EAAE,uBAAuB,EACvC,WAAW,EAAE,mBAAmB,EAChC,eAAe,EAAE,8BAA8B,EAC/C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB;IASzC;;;OAGG;IACG,kBAAkB,CACpB,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,oBAAoB,CAAC;IA8BhC;;;;;;OAMG;IACG,4BAA4B,CAC9B,gBAAgB,EAAE,wBAAwB,EAC1C,OAAO,EAAE,6BAA6B,EACtC,aAAa,GAAE,OAAc,GAC9B,OAAO,CAAC,oBAAoB,CAAC;IAsChC;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAC1B,OAAO,EAAE,6BAA6B,GACvC,aAAa,GAAG,IAAI;CAe1B"}
1
+ {"version":3,"file":"InteractionHandler.d.ts","sourceRoot":"","sources":["../../../src/interaction_handler/InteractionHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,EACvB,aAAa,EACb,MAAM,EAEN,kBAAkB,EAIlB,iBAAiB,EAEjB,6BAA6B,EAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,SAAS,CAAC,UAAU,EAAE,uBAAuB,CAAC;IAC9C,SAAS,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC9C,SAAS,CAAC,eAAe,EAAE,8BAA8B,CAAC;IAC1D,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;gBAG5C,cAAc,EAAE,uBAAuB,EACvC,WAAW,EAAE,mBAAmB,EAChC,eAAe,EAAE,8BAA8B,EAC/C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB;IASzC;;;OAGG;IACG,kBAAkB,CACpB,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,6BAA6B,EACtC,KAAK,EAAE,KAAK,GACb,OAAO,CAAC,oBAAoB,CAAC;IA8BhC;;;;;;OAMG;IACG,4BAA4B,CAC9B,gBAAgB,EAAE,wBAAwB,EAC1C,OAAO,EAAE,6BAA6B,EACtC,KAAK,EAAE,KAAK,EACZ,aAAa,GAAE,OAAc,GAC9B,OAAO,CAAC,oBAAoB,CAAC;IA0ChC;;OAEG;IACH,SAAS,CAAC,oBAAoB,CAC1B,OAAO,EAAE,6BAA6B,GACvC,aAAa,GAAG,IAAI;CAe1B"}
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-browser";
2
- export declare const version = "5.0.2";
2
+ export declare const version = "5.1.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Authorize.d.ts","sourceRoot":"","s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AAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,EACrC,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO,CAAC,oBAAoB,CAAC,CAyC/B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACpC,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,iBAAiB,EAC3B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,uBAAuB,EACnC,cAAc,EAAE,mBAAmB,EACnC,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,EACrC,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO,CAAC,oBAAoB,CAAC,CAkD/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,oBAAoB,EAC5B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,mBAAmB,EACnC,aAAa,EAAE,mBAAmB,EAClC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB,EACrC,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO,CAAC,oBAAoB,CAAC,CA6F/B"}
@@ -90,6 +90,7 @@ export type InMemoryCacheKeys = (typeof InMemoryCacheKeys)[keyof typeof InMemory
90
90
  * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
91
91
  * 0-99 Silent Flow
92
92
  * 800-899 Auth Code Flow
93
+ * 900-999 Misc
93
94
  */
94
95
  export declare const ApiId: {
95
96
  readonly acquireTokenRedirect: 861;
@@ -101,8 +102,27 @@ export declare const ApiId: {
101
102
  readonly acquireTokenSilent_silentFlow: 61;
102
103
  readonly logout: 961;
103
104
  readonly logoutPopup: 962;
105
+ readonly hydrateCache: 963;
106
+ readonly loadExternalTokens: 964;
104
107
  };
105
108
  export type ApiId = (typeof ApiId)[keyof typeof ApiId];
109
+ /**
110
+ * API Names for Telemetry purposes.
111
+ */
112
+ export declare const ApiName: {
113
+ readonly 861: "acquireTokenRedirect";
114
+ readonly 862: "acquireTokenPopup";
115
+ readonly 863: "ssoSilent";
116
+ readonly 864: "acquireTokenSilent_authCode";
117
+ readonly 865: "handleRedirectPromise";
118
+ readonly 866: "acquireTokenByCode";
119
+ readonly 61: "acquireTokenSilent_silentFlow";
120
+ readonly 961: "logout";
121
+ readonly 962: "logoutPopup";
122
+ readonly 963: "hydrateCache";
123
+ readonly 964: "loadExternalTokens";
124
+ };
125
+ export declare const apiIdToName: (id: number | undefined) => string;
106
126
  export declare enum InteractionType {
107
127
  Redirect = "redirect",
108
128
  Popup = "popup",
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;CASjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC5B,CAAC,OAAO,oBAAoB,CAAC,CA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CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAGtE,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,aAAa,QAAoB,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;;;CAmCpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAIpD,CAAC"}
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git"
12
12
  },
13
- "version": "5.0.2",
13
+ "version": "5.1.0",
14
14
  "description": "Microsoft Authentication Library for js",
15
15
  "keywords": [
16
16
  "implicit",
@@ -63,7 +63,9 @@
63
63
  "node": ">=0.8.0"
64
64
  },
65
65
  "beachball": {
66
- "disallowedChangeTypes": []
66
+ "disallowedChangeTypes": [
67
+ "major"
68
+ ]
67
69
  },
68
70
  "directories": {
69
71
  "test": "test"
@@ -126,6 +128,6 @@
126
128
  "typescript": "^4.9.5"
127
129
  },
128
130
  "dependencies": {
129
- "@azure/msal-common": "16.0.2"
131
+ "@azure/msal-common": "16.0.3"
130
132
  }
131
133
  }
@@ -49,6 +49,8 @@ import {
49
49
  InMemoryCacheKeys,
50
50
  INTERACTION_TYPE,
51
51
  TemporaryCacheKeys,
52
+ ApiId,
53
+ apiIdToName,
52
54
  } from "../utils/BrowserConstants.js";
53
55
  import * as CacheKeys from "./CacheKeys.js";
54
56
  import { LocalStorage } from "./LocalStorage.js";
@@ -1050,10 +1052,19 @@ export class BrowserCacheManager extends CacheManager {
1050
1052
  return null;
1051
1053
  }
1052
1054
 
1053
- return CacheManager.toObject<AccountEntity>(
1055
+ const account = CacheManager.toObject<AccountEntity>(
1054
1056
  {} as AccountEntity,
1055
1057
  parsedAccount
1056
1058
  );
1059
+
1060
+ this.performanceClient.addFields(
1061
+ {
1062
+ accountCachedBy: apiIdToName(account.cachedByApiId),
1063
+ },
1064
+ correlationId
1065
+ );
1066
+
1067
+ return account;
1057
1068
  }
1058
1069
 
1059
1070
  /**
@@ -1063,7 +1074,8 @@ export class BrowserCacheManager extends CacheManager {
1063
1074
  async setAccount(
1064
1075
  account: AccountEntity,
1065
1076
  correlationId: string,
1066
- kmsi: boolean
1077
+ kmsi: boolean,
1078
+ apiId: number
1067
1079
  ): Promise<void> {
1068
1080
  this.logger.trace(
1069
1081
  "BrowserCacheManager.setAccount called",
@@ -1074,6 +1086,7 @@ export class BrowserCacheManager extends CacheManager {
1074
1086
  );
1075
1087
  const timestamp = Date.now().toString();
1076
1088
  account.lastUpdatedAt = timestamp;
1089
+ account.cachedByApiId = apiId;
1077
1090
  await this.setUserData(
1078
1091
  key,
1079
1092
  JSON.stringify(account),
@@ -2273,8 +2286,8 @@ export class BrowserCacheManager extends CacheManager {
2273
2286
  | PopupRequest
2274
2287
  ): Promise<void> {
2275
2288
  const idTokenEntity = CacheHelpers.createIdTokenEntity(
2276
- result.account?.homeAccountId,
2277
- result.account?.environment,
2289
+ result.account.homeAccountId,
2290
+ result.account.environment,
2278
2291
  result.idToken,
2279
2292
  this.clientId,
2280
2293
  result.tenantId
@@ -2289,7 +2302,7 @@ export class BrowserCacheManager extends CacheManager {
2289
2302
  */
2290
2303
 
2291
2304
  const accessTokenEntity = CacheHelpers.createAccessTokenEntity(
2292
- result.account?.homeAccountId,
2305
+ result.account.homeAccountId,
2293
2306
  result.account.environment,
2294
2307
  result.accessToken,
2295
2308
  this.clientId,
@@ -2318,7 +2331,8 @@ export class BrowserCacheManager extends CacheManager {
2318
2331
  result.correlationId,
2319
2332
  AuthToken.isKmsi(
2320
2333
  AuthToken.extractTokenClaims(result.idToken, base64Decode)
2321
- )
2334
+ ),
2335
+ ApiId.hydrateCache
2322
2336
  );
2323
2337
  }
2324
2338
 
@@ -2332,6 +2346,7 @@ export class BrowserCacheManager extends CacheManager {
2332
2346
  cacheRecord: CacheRecord,
2333
2347
  correlationId: string,
2334
2348
  kmsi: boolean,
2349
+ apiId: number,
2335
2350
  storeInCache?: StoreInCache
2336
2351
  ): Promise<void> {
2337
2352
  try {
@@ -2339,6 +2354,7 @@ export class BrowserCacheManager extends CacheManager {
2339
2354
  cacheRecord,
2340
2355
  correlationId,
2341
2356
  kmsi,
2357
+ apiId,
2342
2358
  storeInCache
2343
2359
  );
2344
2360
  } catch (e) {
@@ -10,6 +10,7 @@ import {
10
10
  Logger,
11
11
  ScopeSet,
12
12
  Authority,
13
+ AuthorityFactory,
13
14
  AuthorityOptions,
14
15
  ExternalTokenResponse,
15
16
  AccountEntity,
@@ -41,6 +42,7 @@ import { EventHandler } from "../event/EventHandler.js";
41
42
  import * as BrowserUtils from "../utils/BrowserUtils.js";
42
43
  import * as BrowserRootPerformanceEvents from "../telemetry/BrowserRootPerformanceEvents.js";
43
44
  import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
45
+ import { ApiId } from "../utils/BrowserConstants.js";
44
46
 
45
47
  export type LoadTokenOptions = {
46
48
  clientInfo?: string;
@@ -101,20 +103,20 @@ export async function loadExternalTokens(
101
103
  buildStaticAuthorityOptions(browserConfig.auth)
102
104
  );
103
105
 
104
- const authority = request.authority
105
- ? new Authority(
106
- Authority.generateAuthority(
107
- request.authority,
108
- request.azureCloudOptions
109
- ),
110
- browserConfig.system.networkClient,
111
- storage,
112
- authorityOptions,
113
- logger,
114
- request.correlationId || BrowserCrypto.createNewGuid(),
115
- browserConfig.telemetry.client
116
- )
117
- : undefined;
106
+ const authorityString =
107
+ request.authority || browserConfig.auth.authority;
108
+ const authority = await AuthorityFactory.createDiscoveredInstance(
109
+ Authority.generateAuthority(
110
+ authorityString,
111
+ request.azureCloudOptions
112
+ ),
113
+ browserConfig.system.networkClient,
114
+ storage,
115
+ authorityOptions,
116
+ logger,
117
+ correlationId,
118
+ performanceClient
119
+ );
118
120
 
119
121
  const cacheRecordAccount: AccountEntity = await invokeAsync(
120
122
  loadAccount,
@@ -129,8 +131,8 @@ export async function loadExternalTokens(
129
131
  storage,
130
132
  logger,
131
133
  cryptoOps,
132
- idTokenClaims,
133
- authority
134
+ authority,
135
+ idTokenClaims
134
136
  );
135
137
 
136
138
  const idToken = await invokeAsync(
@@ -185,7 +187,8 @@ export async function loadExternalTokens(
185
187
  correlationId,
186
188
  storage,
187
189
  logger,
188
- config.auth.clientId
190
+ config.auth.clientId,
191
+ performanceClient
189
192
  );
190
193
 
191
194
  rootMeasurement.end(
@@ -202,8 +205,8 @@ export async function loadExternalTokens(
202
205
  accessToken,
203
206
  refreshToken,
204
207
  },
205
- idTokenClaims,
206
- authority
208
+ authority,
209
+ idTokenClaims
207
210
  );
208
211
  } catch (error) {
209
212
  rootMeasurement.end({ success: false }, error);
@@ -227,8 +230,8 @@ async function loadAccount(
227
230
  storage: BrowserCacheManager,
228
231
  logger: Logger,
229
232
  cryptoObj: ICrypto,
230
- idTokenClaims?: TokenClaims,
231
- authority?: Authority
233
+ authority: Authority,
234
+ idTokenClaims?: TokenClaims
232
235
  ): Promise<AccountEntity> {
233
236
  logger.verbose("TokenCache - loading account", correlationId);
234
237
 
@@ -240,12 +243,13 @@ async function loadAccount(
240
243
  await storage.setAccount(
241
244
  accountEntity,
242
245
  correlationId,
243
- AuthToken.isKmsi(idTokenClaims || {})
246
+ AuthToken.isKmsi(idTokenClaims || {}),
247
+ ApiId.loadExternalTokens
244
248
  );
245
249
  return accountEntity;
246
- } else if (!authority || (!clientInfo && !idTokenClaims)) {
250
+ } else if (!clientInfo && !idTokenClaims) {
247
251
  logger.error(
248
- "TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead.",
252
+ "TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead.",
249
253
  correlationId
250
254
  );
251
255
  throw createBrowserAuthError(BrowserAuthErrorCodes.unableToLoadToken);
@@ -270,7 +274,7 @@ async function loadAccount(
270
274
  correlationId,
271
275
  idTokenClaims,
272
276
  clientInfo,
273
- authority.hostnameAndPort,
277
+ authority.getPreferredCache(),
274
278
  claimsTenantId,
275
279
  undefined, // authCodePayload
276
280
  undefined, // nativeAccountId
@@ -280,7 +284,8 @@ async function loadAccount(
280
284
  await storage.setAccount(
281
285
  cachedAccount,
282
286
  correlationId,
283
- AuthToken.isKmsi(idTokenClaims || {})
287
+ AuthToken.isKmsi(idTokenClaims || {}),
288
+ ApiId.loadExternalTokens
284
289
  );
285
290
  return cachedAccount;
286
291
  }
@@ -416,7 +421,8 @@ async function loadRefreshToken(
416
421
  correlationId: string,
417
422
  storage: BrowserCacheManager,
418
423
  logger: Logger,
419
- clientId: string
424
+ clientId: string,
425
+ performanceClient: IPerformanceClient
420
426
  ): Promise<RefreshTokenEntity | null> {
421
427
  if (!response.refresh_token) {
422
428
  logger.verbose(
@@ -426,6 +432,16 @@ async function loadRefreshToken(
426
432
  return null;
427
433
  }
428
434
 
435
+ const expiresOn = response.refresh_token_expires_in
436
+ ? response.refresh_token_expires_in + TimeUtils.nowSeconds()
437
+ : undefined;
438
+ performanceClient.addFields(
439
+ {
440
+ extRtExpiresOnSeconds: expiresOn,
441
+ },
442
+ correlationId
443
+ );
444
+
429
445
  logger.verbose("TokenCache - loading refresh token", correlationId);
430
446
  const refreshTokenEntity = CacheHelpers.createRefreshTokenEntity(
431
447
  homeAccountId,
@@ -434,7 +450,7 @@ async function loadRefreshToken(
434
450
  clientId,
435
451
  response.foci,
436
452
  undefined, // userAssertionHash
437
- response.refresh_token_expires_in
453
+ expiresOn
438
454
  );
439
455
 
440
456
  await storage.setRefreshTokenCredential(
@@ -456,8 +472,8 @@ async function loadRefreshToken(
456
472
  function generateAuthenticationResult(
457
473
  request: SilentRequest,
458
474
  cacheRecord: CacheRecord & { account: AccountEntity },
459
- idTokenClaims?: TokenClaims,
460
- authority?: Authority
475
+ authority: Authority,
476
+ idTokenClaims?: TokenClaims
461
477
  ): AuthenticationResult {
462
478
  let accessToken: string = "";
463
479
  let responseScopes: Array<string> = [];
@@ -481,7 +497,7 @@ function generateAuthenticationResult(
481
497
  const accountEntity = cacheRecord.account;
482
498
 
483
499
  return {
484
- authority: authority ? authority.canonicalAuthority : "",
500
+ authority: authority.canonicalAuthority,
485
501
  uniqueId: cacheRecord.account.localAccountId,
486
502
  tenantId: cacheRecord.account.realm,
487
503
  scopes: responseScopes,
@@ -35,6 +35,7 @@ import {
35
35
  InteractionType,
36
36
  DEFAULT_REQUEST,
37
37
  CacheLookupPolicy,
38
+ ApiId,
38
39
  } from "../utils/BrowserConstants.js";
39
40
  import { IController } from "./IController.js";
40
41
  import { NestedAppOperatingContext } from "../operatingcontext/NestedAppOperatingContext.js";
@@ -836,7 +837,8 @@ export class NestedAppAuthController implements IController {
836
837
  await this.browserStorage.setAccount(
837
838
  accountEntity,
838
839
  result.correlationId,
839
- AuthToken.isKmsi(result.idTokenClaims)
840
+ AuthToken.isKmsi(result.idTokenClaims),
841
+ ApiId.hydrateCache
840
842
  );
841
843
  return this.browserStorage.hydrateCache(result, request);
842
844
  }
@@ -1438,7 +1438,8 @@ export class StandardController implements IController {
1438
1438
  await this.browserStorage.setAccount(
1439
1439
  accountEntity,
1440
1440
  result.correlationId,
1441
- AuthToken.isKmsi(result.idTokenClaims)
1441
+ AuthToken.isKmsi(result.idTokenClaims),
1442
+ ApiId.hydrateCache
1442
1443
  );
1443
1444
 
1444
1445
  if (result.fromPlatformBroker) {
@@ -99,7 +99,8 @@ export abstract class CustomAuthInteractionClientBase extends StandardInteractio
99
99
  protected async handleTokenResponse(
100
100
  tokenResponse: SignInTokenResponse,
101
101
  requestScopes: string[],
102
- correlationId: string
102
+ correlationId: string,
103
+ apiId: number
103
104
  ): Promise<AuthenticationResult> {
104
105
  this.logger.verbose("Processing token response.", correlationId);
105
106
 
@@ -116,7 +117,8 @@ export abstract class CustomAuthInteractionClientBase extends StandardInteractio
116
117
  correlationId:
117
118
  tokenResponse.correlation_id ?? correlationId,
118
119
  scopes: requestScopes,
119
- }
120
+ },
121
+ apiId
120
122
  );
121
123
 
122
124
  return result as AuthenticationResult;
@@ -172,7 +172,8 @@ export class JitClient extends CustomAuthInteractionClientBase {
172
172
  scopes,
173
173
  tokenResponse.correlation_id ||
174
174
  continueResponse.correlation_id ||
175
- correlationId
175
+ correlationId,
176
+ apiId
176
177
  );
177
178
 
178
179
  return createJitCompletedResult({
@@ -154,7 +154,8 @@ export class MfaClient extends CustomAuthInteractionClientBase {
154
154
  const result = await this.handleTokenResponse(
155
155
  tokenResponse,
156
156
  scopes,
157
- tokenResponse.correlation_id || correlationId
157
+ tokenResponse.correlation_id || correlationId,
158
+ apiId
158
159
  );
159
160
 
160
161
  return createMfaCompletedResult({
@@ -98,7 +98,8 @@ export class CustomAuthSilentCacheClient extends CustomAuthInteractionClientBase
98
98
 
99
99
  const refreshTokenResult =
100
100
  await refreshTokenClient.acquireTokenByRefreshToken(
101
- silentRequest
101
+ silentRequest,
102
+ PublicApiId.ACCOUNT_GET_ACCESS_TOKEN
102
103
  );
103
104
 
104
105
  this.logger.verbose(
@@ -198,7 +198,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
198
198
  ),
199
199
  scopes,
200
200
  correlationId,
201
- telemetryManager
201
+ telemetryManager,
202
+ apiId
202
203
  );
203
204
  }
204
205
 
@@ -249,7 +250,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
249
250
  ),
250
251
  scopes,
251
252
  correlationId,
252
- telemetryManager
253
+ telemetryManager,
254
+ apiId
253
255
  );
254
256
  }
255
257
 
@@ -299,7 +301,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
299
301
  ),
300
302
  scopes,
301
303
  correlationId,
302
- telemetryManager
304
+ telemetryManager,
305
+ apiId
303
306
  );
304
307
  }
305
308
 
@@ -315,7 +318,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
315
318
  tokenEndpointCaller: () => Promise<SignInTokenResponse>,
316
319
  scopes: string[],
317
320
  correlationId: string,
318
- telemetryManager: ServerTelemetryManager
321
+ telemetryManager: ServerTelemetryManager,
322
+ apiId: number
319
323
  ): Promise<
320
324
  | SignInCompletedResult
321
325
  | SignInJitRequiredResult
@@ -337,7 +341,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
337
341
  const authResult = await this.handleTokenResponse(
338
342
  tokenResponse,
339
343
  scopes,
340
- tokenResponse.correlation_id || correlationId
344
+ tokenResponse.correlation_id || correlationId,
345
+ apiId
341
346
  );
342
347
 
343
348
  return createSignInCompleteResult({
@@ -765,7 +765,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
765
765
  await this.browserStorage.setAccount(
766
766
  accountEntity,
767
767
  this.correlationId,
768
- kmsi
768
+ kmsi,
769
+ this.apiId
769
770
  );
770
771
  // Remove any existing cached tokens for this account in browser storage
771
772
  this.browserStorage.removeAccountContext(
@@ -841,6 +842,7 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
841
842
  nativeCacheRecord,
842
843
  this.correlationId,
843
844
  AuthToken.isKmsi(idTokenClaims),
845
+ this.apiId,
844
846
  request.storeInCache
845
847
  );
846
848
  }
@@ -161,6 +161,7 @@ export class SilentAuthCodeClient extends StandardInteractionClient {
161
161
  cloud_instance_host_name: request.cloudInstanceHostName,
162
162
  },
163
163
  silentRequest,
164
+ this.apiId,
164
165
  false
165
166
  );
166
167
  } catch (e) {
@@ -86,11 +86,13 @@ export class SilentRefreshClient extends StandardInteractionClient {
86
86
  this.logger,
87
87
  this.performanceClient,
88
88
  request.correlationId
89
- )(silentRequest).catch((e: AuthError) => {
90
- (e as AuthError).setCorrelationId(this.correlationId);
91
- serverTelemetryManager.cacheFailedRequest(e);
92
- throw e;
93
- }) as Promise<AuthenticationResult>;
89
+ )(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(
90
+ (e: AuthError) => {
91
+ (e as AuthError).setCorrelationId(this.correlationId);
92
+ serverTelemetryManager.cacheFailedRequest(e);
93
+ throw e;
94
+ }
95
+ ) as Promise<AuthenticationResult>;
94
96
  }
95
97
 
96
98
  /**
@@ -18,6 +18,7 @@ import {
18
18
  AuthorizeProtocol,
19
19
  CommonAuthorizationUrlRequest,
20
20
  } from "@azure/msal-common/browser";
21
+ import { ApiId } from "../utils/BrowserConstants.js";
21
22
  import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
22
23
  import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
23
24
  import {
@@ -56,7 +57,8 @@ export class InteractionHandler {
56
57
  */
57
58
  async handleCodeResponse(
58
59
  response: AuthorizeResponse,
59
- request: CommonAuthorizationUrlRequest
60
+ request: CommonAuthorizationUrlRequest,
61
+ apiId: ApiId
60
62
  ): Promise<AuthenticationResult> {
61
63
  let authCodeResponse;
62
64
  try {
@@ -84,7 +86,7 @@ export class InteractionHandler {
84
86
  this.logger,
85
87
  this.performanceClient,
86
88
  request.correlationId
87
- )(authCodeResponse, request);
89
+ )(authCodeResponse, request, apiId);
88
90
  }
89
91
 
90
92
  /**
@@ -97,6 +99,7 @@ export class InteractionHandler {
97
99
  async handleCodeResponseFromServer(
98
100
  authCodeResponse: AuthorizationCodePayload,
99
101
  request: CommonAuthorizationUrlRequest,
102
+ apiId: ApiId,
100
103
  validateNonce: boolean = true
101
104
  ): Promise<AuthenticationResult> {
102
105
  this.logger.trace(
@@ -132,7 +135,11 @@ export class InteractionHandler {
132
135
  this.logger,
133
136
  this.performanceClient,
134
137
  request.correlationId
135
- )(this.authCodeRequest, authCodeResponse)) as AuthenticationResult;
138
+ )(
139
+ this.authCodeRequest,
140
+ apiId,
141
+ authCodeResponse
142
+ )) as AuthenticationResult;
136
143
  return tokenResponse;
137
144
  }
138
145
 
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-browser";
3
- export const version = "5.0.2";
3
+ export const version = "5.1.0";
@@ -434,7 +434,7 @@ export async function handleResponseCode(
434
434
  logger,
435
435
  performanceClient,
436
436
  request.correlationId
437
- )(response, request);
437
+ )(response, request, apiId);
438
438
 
439
439
  return result;
440
440
  }
@@ -552,6 +552,7 @@ export async function handleResponseEAR(
552
552
  authority,
553
553
  TimeUtils.nowSeconds(),
554
554
  request,
555
+ apiId,
555
556
  additionalData,
556
557
  undefined,
557
558
  undefined,