@azure/msal-browser 4.15.0 → 4.16.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 (307) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  8. package/dist/cache/AccountManager.mjs +1 -1
  9. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  10. package/dist/cache/BrowserCacheManager.mjs +1 -1
  11. package/dist/cache/CacheHelpers.mjs +1 -1
  12. package/dist/cache/CookieStorage.mjs +1 -1
  13. package/dist/cache/DatabaseStorage.mjs +1 -1
  14. package/dist/cache/LocalStorage.mjs +1 -1
  15. package/dist/cache/MemoryStorage.mjs +1 -1
  16. package/dist/cache/SessionStorage.mjs +1 -1
  17. package/dist/cache/TokenCache.mjs +1 -1
  18. package/dist/config/Configuration.mjs +1 -1
  19. package/dist/controllers/ControllerFactory.mjs +1 -1
  20. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  21. package/dist/controllers/NestedAppAuthController.mjs +15 -3
  22. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  23. package/dist/controllers/StandardController.mjs +1 -1
  24. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  25. package/dist/crypto/BrowserCrypto.mjs +1 -1
  26. package/dist/crypto/CryptoOps.mjs +1 -1
  27. package/dist/crypto/PkceGenerator.mjs +1 -1
  28. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  29. package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
  30. package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  31. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  32. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  33. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  34. package/dist/custom-auth-path/cache/AccountManager.mjs +1 -1
  35. package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
  36. package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +1 -1
  37. package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
  38. package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
  39. package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
  40. package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
  41. package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
  42. package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
  43. package/dist/custom-auth-path/cache/TokenCache.mjs +1 -1
  44. package/dist/custom-auth-path/config/Configuration.mjs +1 -1
  45. package/dist/custom-auth-path/controllers/ControllerFactory.mjs +1 -1
  46. package/dist/custom-auth-path/controllers/NestedAppAuthController.d.ts.map +1 -1
  47. package/dist/custom-auth-path/controllers/StandardController.mjs +1 -1
  48. package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
  49. package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
  50. package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
  51. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
  52. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
  53. package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  54. package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  55. package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  56. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  57. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  58. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  59. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  60. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
  61. package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
  62. package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  63. package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  64. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  65. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  66. package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  67. package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  68. package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  69. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  70. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  71. package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
  72. package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  73. package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  74. package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  75. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  76. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  77. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  78. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  79. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  80. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  81. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  82. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  83. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  84. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  85. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  86. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  87. package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  88. package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  89. package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
  90. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  91. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  92. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  93. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  94. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  95. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  96. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  97. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  98. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  99. package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
  100. package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  101. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  102. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  103. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  104. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  105. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  106. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  107. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  108. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  109. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  110. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  111. package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  112. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  113. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  114. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  115. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  116. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  117. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCredentialResult.mjs +1 -1
  118. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  119. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  120. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  121. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  122. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  123. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  124. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  125. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  126. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  127. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  128. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  129. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  130. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  131. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  132. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  133. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  134. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  135. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  136. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  137. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  138. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  139. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  140. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  141. package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
  142. package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
  143. package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
  144. package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
  145. package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
  146. package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  147. package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
  148. package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
  149. package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
  150. package/dist/custom-auth-path/event/EventType.mjs +1 -1
  151. package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
  152. package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  153. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  154. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts +2 -1
  155. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts.map +1 -1
  156. package/dist/custom-auth-path/interaction_client/PopupClient.mjs +43 -14
  157. package/dist/custom-auth-path/interaction_client/PopupClient.mjs.map +1 -1
  158. package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts +5 -0
  159. package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts.map +1 -1
  160. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +42 -15
  161. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
  162. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
  163. package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
  164. package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts.map +1 -1
  165. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +13 -7
  166. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs.map +1 -1
  167. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
  168. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  169. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +7 -3
  170. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs.map +1 -1
  171. package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
  172. package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts +1 -0
  173. package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts.map +1 -1
  174. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +12 -3
  175. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs.map +1 -1
  176. package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
  177. package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
  178. package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
  179. package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
  180. package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
  181. package/dist/custom-auth-path/packageMetadata.mjs +2 -2
  182. package/dist/custom-auth-path/protocol/Authorize.d.ts +4 -0
  183. package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
  184. package/dist/custom-auth-path/protocol/Authorize.mjs +15 -2
  185. package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
  186. package/dist/custom-auth-path/request/RequestHelpers.d.ts +11 -1
  187. package/dist/custom-auth-path/request/RequestHelpers.d.ts.map +1 -1
  188. package/dist/custom-auth-path/request/RequestHelpers.mjs +32 -3
  189. package/dist/custom-auth-path/request/RequestHelpers.mjs.map +1 -1
  190. package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
  191. package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
  192. package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
  193. package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
  194. package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
  195. package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
  196. package/dist/encode/Base64Decode.mjs +1 -1
  197. package/dist/encode/Base64Encode.mjs +1 -1
  198. package/dist/error/BrowserAuthError.mjs +1 -1
  199. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  200. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  201. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  202. package/dist/error/NativeAuthError.mjs +1 -1
  203. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  204. package/dist/error/NestedAppAuthError.mjs +1 -1
  205. package/dist/event/EventHandler.mjs +1 -1
  206. package/dist/event/EventMessage.mjs +1 -1
  207. package/dist/event/EventType.mjs +1 -1
  208. package/dist/index.mjs +1 -1
  209. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  210. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  211. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  212. package/dist/interaction_client/PopupClient.d.ts +2 -1
  213. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  214. package/dist/interaction_client/PopupClient.mjs +43 -14
  215. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  216. package/dist/interaction_client/RedirectClient.d.ts +5 -0
  217. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  218. package/dist/interaction_client/RedirectClient.mjs +42 -15
  219. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  220. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  221. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  222. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  223. package/dist/interaction_client/SilentIframeClient.mjs +13 -7
  224. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  225. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  226. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  227. package/dist/interaction_client/StandardInteractionClient.mjs +7 -3
  228. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  229. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  230. package/dist/interaction_handler/SilentHandler.d.ts +1 -0
  231. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  232. package/dist/interaction_handler/SilentHandler.mjs +12 -3
  233. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  234. package/dist/naa/BridgeError.mjs +1 -1
  235. package/dist/naa/BridgeProxy.mjs +1 -1
  236. package/dist/naa/BridgeStatusCode.mjs +1 -1
  237. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  238. package/dist/navigation/NavigationClient.mjs +1 -1
  239. package/dist/network/FetchClient.mjs +1 -1
  240. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  241. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  242. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  243. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  244. package/dist/packageMetadata.d.ts +1 -1
  245. package/dist/packageMetadata.mjs +2 -2
  246. package/dist/protocol/Authorize.d.ts +4 -0
  247. package/dist/protocol/Authorize.d.ts.map +1 -1
  248. package/dist/protocol/Authorize.mjs +15 -2
  249. package/dist/protocol/Authorize.mjs.map +1 -1
  250. package/dist/request/RequestHelpers.d.ts +11 -1
  251. package/dist/request/RequestHelpers.d.ts.map +1 -1
  252. package/dist/request/RequestHelpers.mjs +32 -3
  253. package/dist/request/RequestHelpers.mjs.map +1 -1
  254. package/dist/response/ResponseHandler.mjs +1 -1
  255. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  256. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  257. package/dist/utils/BrowserConstants.mjs +1 -1
  258. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  259. package/dist/utils/BrowserUtils.mjs +1 -1
  260. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  261. package/lib/custom-auth-path/msal-custom-auth.cjs +230 -94
  262. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  263. package/lib/custom-auth-path/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  264. package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  265. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts +2 -1
  266. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts.map +1 -1
  267. package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts +5 -0
  268. package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts.map +1 -1
  269. package/lib/custom-auth-path/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  270. package/lib/custom-auth-path/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  271. package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts +1 -0
  272. package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  273. package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
  274. package/lib/custom-auth-path/types/protocol/Authorize.d.ts +4 -0
  275. package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
  276. package/lib/custom-auth-path/types/request/RequestHelpers.d.ts +11 -1
  277. package/lib/custom-auth-path/types/request/RequestHelpers.d.ts.map +1 -1
  278. package/lib/msal-browser.cjs +256 -98
  279. package/lib/msal-browser.cjs.map +1 -1
  280. package/lib/msal-browser.js +256 -98
  281. package/lib/msal-browser.js.map +1 -1
  282. package/lib/msal-browser.min.js +68 -68
  283. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  284. package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  285. package/lib/types/interaction_client/PopupClient.d.ts +2 -1
  286. package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
  287. package/lib/types/interaction_client/RedirectClient.d.ts +5 -0
  288. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
  289. package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  290. package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  291. package/lib/types/interaction_handler/SilentHandler.d.ts +1 -0
  292. package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  293. package/lib/types/packageMetadata.d.ts +1 -1
  294. package/lib/types/protocol/Authorize.d.ts +4 -0
  295. package/lib/types/protocol/Authorize.d.ts.map +1 -1
  296. package/lib/types/request/RequestHelpers.d.ts +11 -1
  297. package/lib/types/request/RequestHelpers.d.ts.map +1 -1
  298. package/package.json +2 -2
  299. package/src/controllers/NestedAppAuthController.ts +18 -2
  300. package/src/interaction_client/PopupClient.ts +161 -63
  301. package/src/interaction_client/RedirectClient.ts +86 -35
  302. package/src/interaction_client/SilentIframeClient.ts +49 -28
  303. package/src/interaction_client/StandardInteractionClient.ts +13 -2
  304. package/src/interaction_handler/SilentHandler.ts +24 -1
  305. package/src/packageMetadata.ts +1 -1
  306. package/src/protocol/Authorize.ts +48 -0
  307. package/src/request/RequestHelpers.ts +45 -0
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v4.15.0 2025-07-08 */
1
+ /*! @azure/msal-browser v4.16.0 2025-07-23 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
8
8
  * Licensed under the MIT License.
@@ -82,6 +82,10 @@ const HttpStatus = {
82
82
  SERVER_ERROR_RANGE_END: 599,
83
83
  MULTI_SIDED_ERROR: 600,
84
84
  };
85
+ const HttpMethod$1 = {
86
+ GET: "GET",
87
+ POST: "POST",
88
+ };
85
89
  const OIDC_DEFAULT_SCOPES = [
86
90
  Constants.OPENID_SCOPE,
87
91
  Constants.PROFILE_SCOPE,
@@ -274,7 +278,7 @@ const JsonWebTokenTypes = {
274
278
  // Token renewal offset default in seconds
275
279
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
276
280
 
277
- /*! @azure/msal-common v15.8.1 2025-07-08 */
281
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
278
282
  /*
279
283
  * Copyright (c) Microsoft Corporation. All rights reserved.
280
284
  * Licensed under the MIT License.
@@ -285,7 +289,7 @@ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
285
289
  const unexpectedError = "unexpected_error";
286
290
  const postRequestFailed$1 = "post_request_failed";
287
291
 
288
- /*! @azure/msal-common v15.8.1 2025-07-08 */
292
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
289
293
 
290
294
  /*
291
295
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -320,7 +324,7 @@ function createAuthError(code, additionalMessage) {
320
324
  : AuthErrorMessages[code]);
321
325
  }
322
326
 
323
- /*! @azure/msal-common v15.8.1 2025-07-08 */
327
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
324
328
  /*
325
329
  * Copyright (c) Microsoft Corporation. All rights reserved.
326
330
  * Licensed under the MIT License.
@@ -370,7 +374,7 @@ const missingTenantIdError = "missing_tenant_id_error";
370
374
  const methodNotImplemented = "method_not_implemented";
371
375
  const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
372
376
 
373
- /*! @azure/msal-common v15.8.1 2025-07-08 */
377
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
374
378
 
375
379
  /*
376
380
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -444,7 +448,7 @@ function createClientAuthError(errorCode, additionalMessage) {
444
448
  return new ClientAuthError(errorCode, additionalMessage);
445
449
  }
446
450
 
447
- /*! @azure/msal-common v15.8.1 2025-07-08 */
451
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
448
452
 
449
453
  /*
450
454
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -483,7 +487,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
483
487
  },
484
488
  };
485
489
 
486
- /*! @azure/msal-common v15.8.1 2025-07-08 */
490
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
487
491
 
488
492
  /*
489
493
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -674,12 +678,12 @@ class Logger {
674
678
  }
675
679
  }
676
680
 
677
- /*! @azure/msal-common v15.8.1 2025-07-08 */
681
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
678
682
  /* eslint-disable header/header */
679
683
  const name$1 = "@azure/msal-common";
680
- const version$1 = "15.8.1";
684
+ const version$1 = "15.9.0";
681
685
 
682
- /*! @azure/msal-common v15.8.1 2025-07-08 */
686
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
683
687
  /*
684
688
  * Copyright (c) Microsoft Corporation. All rights reserved.
685
689
  * Licensed under the MIT License.
@@ -688,7 +692,7 @@ const AzureCloudInstance = {
688
692
  // AzureCloudInstance is not specified.
689
693
  None: "none"};
690
694
 
691
- /*! @azure/msal-common v15.8.1 2025-07-08 */
695
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
692
696
 
693
697
  /*
694
698
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -749,7 +753,7 @@ function checkMaxAge(authTime, maxAge) {
749
753
  }
750
754
  }
751
755
 
752
- /*! @azure/msal-common v15.8.1 2025-07-08 */
756
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
753
757
  /*
754
758
  * Copyright (c) Microsoft Corporation. All rights reserved.
755
759
  * Licensed under the MIT License.
@@ -804,7 +808,7 @@ function wasClockTurnedBack(cachedAt) {
804
808
  return cachedAtSec > nowSeconds();
805
809
  }
806
810
 
807
- /*! @azure/msal-common v15.8.1 2025-07-08 */
811
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
808
812
 
809
813
  /*
810
814
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1131,7 +1135,7 @@ function isAuthorityMetadataExpired(metadata) {
1131
1135
  return metadata.expiresAt <= nowSeconds();
1132
1136
  }
1133
1137
 
1134
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1138
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1135
1139
  /*
1136
1140
  * Copyright (c) Microsoft Corporation. All rights reserved.
1137
1141
  * Licensed under the MIT License.
@@ -1156,9 +1160,11 @@ const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
1156
1160
  const invalidAuthenticationHeader = "invalid_authentication_header";
1157
1161
  const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
1158
1162
  const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
1159
- const authorityMismatch = "authority_mismatch";
1163
+ const authorityMismatch = "authority_mismatch";
1164
+ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
1165
+ const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
1160
1166
 
1161
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1167
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1162
1168
 
1163
1169
  /*
1164
1170
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1186,6 +1192,8 @@ const ClientConfigurationErrorMessages = {
1186
1192
  [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",
1187
1193
  [cannotAllowPlatformBroker]: "Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",
1188
1194
  [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",
1195
+ [invalidAuthorizePostBodyParameters]: "Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",
1196
+ [invalidRequestMethodForEAR]: "Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST.",
1189
1197
  };
1190
1198
  /**
1191
1199
  * Error thrown when there is an error in configuration of the MSAL.js library.
@@ -1201,7 +1209,7 @@ function createClientConfigurationError(errorCode) {
1201
1209
  return new ClientConfigurationError(errorCode);
1202
1210
  }
1203
1211
 
1204
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1212
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1205
1213
  /*
1206
1214
  * Copyright (c) Microsoft Corporation. All rights reserved.
1207
1215
  * Licensed under the MIT License.
@@ -1298,7 +1306,7 @@ class StringUtils {
1298
1306
  }
1299
1307
  }
1300
1308
 
1301
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1309
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1302
1310
 
1303
1311
  /*
1304
1312
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1489,7 +1497,7 @@ class ScopeSet {
1489
1497
  }
1490
1498
  }
1491
1499
 
1492
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1500
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1493
1501
 
1494
1502
  /*
1495
1503
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1529,7 +1537,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
1529
1537
  };
1530
1538
  }
1531
1539
 
1532
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1540
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1533
1541
  /*
1534
1542
  * Copyright (c) Microsoft Corporation. All rights reserved.
1535
1543
  * Licensed under the MIT License.
@@ -1608,7 +1616,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
1608
1616
  return updatedAccountInfo;
1609
1617
  }
1610
1618
 
1611
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1619
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1612
1620
  /*
1613
1621
  * Copyright (c) Microsoft Corporation. All rights reserved.
1614
1622
  * Licensed under the MIT License.
@@ -1623,7 +1631,7 @@ const AuthorityType = {
1623
1631
  Ciam: 3,
1624
1632
  };
1625
1633
 
1626
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1634
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1627
1635
  /*
1628
1636
  * Copyright (c) Microsoft Corporation. All rights reserved.
1629
1637
  * Licensed under the MIT License.
@@ -1645,7 +1653,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
1645
1653
  return null;
1646
1654
  }
1647
1655
 
1648
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1656
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1649
1657
  /*
1650
1658
  * Copyright (c) Microsoft Corporation. All rights reserved.
1651
1659
  * Licensed under the MIT License.
@@ -1669,7 +1677,7 @@ const ProtocolMode = {
1669
1677
  EAR: "EAR",
1670
1678
  };
1671
1679
 
1672
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1680
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1673
1681
 
1674
1682
  /*
1675
1683
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1912,7 +1920,7 @@ class AccountEntity {
1912
1920
  }
1913
1921
  }
1914
1922
 
1915
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1923
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1916
1924
 
1917
1925
  /*
1918
1926
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1977,7 +1985,7 @@ function mapToQueryString(parameters, encodeExtraParams = true, extraQueryParame
1977
1985
  return queryParameterArray.join("&");
1978
1986
  }
1979
1987
 
1980
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1988
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1981
1989
 
1982
1990
  /*
1983
1991
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2141,7 +2149,7 @@ class UrlString {
2141
2149
  }
2142
2150
  }
2143
2151
 
2144
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2152
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2145
2153
 
2146
2154
  /*
2147
2155
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2280,7 +2288,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2280
2288
  return null;
2281
2289
  }
2282
2290
 
2283
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2291
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2284
2292
  /*
2285
2293
  * Copyright (c) Microsoft Corporation. All rights reserved.
2286
2294
  * Licensed under the MIT License.
@@ -2288,7 +2296,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
2288
2296
  const cacheQuotaExceeded = "cache_quota_exceeded";
2289
2297
  const cacheErrorUnknown = "cache_error_unknown";
2290
2298
 
2291
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2299
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2292
2300
 
2293
2301
  /*
2294
2302
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2333,7 +2341,7 @@ function createCacheError(e) {
2333
2341
  }
2334
2342
  }
2335
2343
 
2336
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2344
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2337
2345
 
2338
2346
  /*
2339
2347
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3499,7 +3507,7 @@ class DefaultStorageClass extends CacheManager {
3499
3507
  }
3500
3508
  }
3501
3509
 
3502
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3510
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3503
3511
  /*
3504
3512
  * Copyright (c) Microsoft Corporation. All rights reserved.
3505
3513
  * Licensed under the MIT License.
@@ -3766,7 +3774,7 @@ const PerformanceEvents = {
3766
3774
  const PerformanceEventStatus = {
3767
3775
  InProgress: 1};
3768
3776
 
3769
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3777
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3770
3778
 
3771
3779
  /*
3772
3780
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3845,7 +3853,7 @@ class StubPerformanceClient {
3845
3853
  }
3846
3854
  }
3847
3855
 
3848
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3856
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3849
3857
 
3850
3858
  /*
3851
3859
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3945,7 +3953,7 @@ function isOidcProtocolMode(config) {
3945
3953
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
3946
3954
  }
3947
3955
 
3948
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3956
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3949
3957
  /*
3950
3958
  * Copyright (c) Microsoft Corporation. All rights reserved.
3951
3959
  * Licensed under the MIT License.
@@ -3955,7 +3963,7 @@ const CcsCredentialType = {
3955
3963
  UPN: "UPN",
3956
3964
  };
3957
3965
 
3958
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3966
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3959
3967
  /*
3960
3968
  * Copyright (c) Microsoft Corporation. All rights reserved.
3961
3969
  * Licensed under the MIT License.
@@ -4005,7 +4013,7 @@ const INSTANCE_AWARE = "instance_aware";
4005
4013
  const EAR_JWK = "ear_jwk";
4006
4014
  const EAR_JWE_CRYPTO = "ear_jwe_crypto";
4007
4015
 
4008
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4016
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4009
4017
 
4010
4018
  /*
4011
4019
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4371,9 +4379,21 @@ function addEARParameters(parameters, jwk) {
4371
4379
  // ear_jwe_crypto will always have value: {"alg":"dir","enc":"A256GCM"} so we can hardcode this
4372
4380
  const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
4373
4381
  parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
4382
+ }
4383
+ /**
4384
+ * Adds authorize body parameters to the request parameters
4385
+ * @param parameters
4386
+ * @param bodyParameters
4387
+ */
4388
+ function addPostBodyParameters(parameters, bodyParameters) {
4389
+ Object.entries(bodyParameters).forEach(([key, value]) => {
4390
+ if (value) {
4391
+ parameters.set(key, value);
4392
+ }
4393
+ });
4374
4394
  }
4375
4395
 
4376
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4396
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4377
4397
  /*
4378
4398
  * Copyright (c) Microsoft Corporation. All rights reserved.
4379
4399
  * Licensed under the MIT License.
@@ -4385,7 +4405,7 @@ function isOpenIdConfigResponse(response) {
4385
4405
  response.hasOwnProperty("jwks_uri"));
4386
4406
  }
4387
4407
 
4388
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4408
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4389
4409
  /*
4390
4410
  * Copyright (c) Microsoft Corporation. All rights reserved.
4391
4411
  * Licensed under the MIT License.
@@ -4395,7 +4415,7 @@ function isCloudInstanceDiscoveryResponse(response) {
4395
4415
  response.hasOwnProperty("metadata"));
4396
4416
  }
4397
4417
 
4398
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4418
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4399
4419
  /*
4400
4420
  * Copyright (c) Microsoft Corporation. All rights reserved.
4401
4421
  * Licensed under the MIT License.
@@ -4405,7 +4425,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
4405
4425
  response.hasOwnProperty("error_description"));
4406
4426
  }
4407
4427
 
4408
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4428
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4409
4429
  /*
4410
4430
  * Copyright (c) Microsoft Corporation. All rights reserved.
4411
4431
  * Licensed under the MIT License.
@@ -4501,7 +4521,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
4501
4521
  };
4502
4522
  };
4503
4523
 
4504
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4524
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4505
4525
 
4506
4526
  /*
4507
4527
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4607,7 +4627,7 @@ RegionDiscovery.IMDS_OPTIONS = {
4607
4627
  },
4608
4628
  };
4609
4629
 
4610
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4630
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4611
4631
 
4612
4632
  /*
4613
4633
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5446,7 +5466,7 @@ function buildStaticAuthorityOptions(authOptions) {
5446
5466
  };
5447
5467
  }
5448
5468
 
5449
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5469
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5450
5470
 
5451
5471
  /*
5452
5472
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5477,7 +5497,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
5477
5497
  }
5478
5498
  }
5479
5499
 
5480
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5500
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5481
5501
 
5482
5502
  /*
5483
5503
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5496,7 +5516,7 @@ class ServerError extends AuthError {
5496
5516
  }
5497
5517
  }
5498
5518
 
5499
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5519
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5500
5520
  /*
5501
5521
  * Copyright (c) Microsoft Corporation. All rights reserved.
5502
5522
  * Licensed under the MIT License.
@@ -5517,7 +5537,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
5517
5537
  };
5518
5538
  }
5519
5539
 
5520
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5540
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5521
5541
 
5522
5542
  /*
5523
5543
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5604,7 +5624,7 @@ class ThrottlingUtils {
5604
5624
  }
5605
5625
  }
5606
5626
 
5607
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5627
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5608
5628
 
5609
5629
  /*
5610
5630
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5635,7 +5655,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
5635
5655
  return new NetworkError(error, httpStatus, responseHeaders);
5636
5656
  }
5637
5657
 
5638
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5658
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5639
5659
 
5640
5660
  /*
5641
5661
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5783,7 +5803,7 @@ class BaseClient {
5783
5803
  }
5784
5804
  }
5785
5805
 
5786
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5806
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5787
5807
  /*
5788
5808
  * Copyright (c) Microsoft Corporation. All rights reserved.
5789
5809
  * Licensed under the MIT License.
@@ -5799,7 +5819,7 @@ const consentRequired = "consent_required";
5799
5819
  const loginRequired = "login_required";
5800
5820
  const badToken = "bad_token";
5801
5821
 
5802
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5822
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5803
5823
 
5804
5824
  /*
5805
5825
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5871,7 +5891,7 @@ function createInteractionRequiredAuthError(errorCode) {
5871
5891
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
5872
5892
  }
5873
5893
 
5874
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5894
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5875
5895
 
5876
5896
  /*
5877
5897
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5943,7 +5963,7 @@ class ProtocolUtils {
5943
5963
  }
5944
5964
  }
5945
5965
 
5946
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5966
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5947
5967
 
5948
5968
  /*
5949
5969
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6025,7 +6045,7 @@ class PopTokenGenerator {
6025
6045
  }
6026
6046
  }
6027
6047
 
6028
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6048
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6029
6049
  /*
6030
6050
  * Copyright (c) Microsoft Corporation. All rights reserved.
6031
6051
  * Licensed under the MIT License.
@@ -6052,7 +6072,7 @@ class PopTokenGenerator {
6052
6072
  }
6053
6073
  }
6054
6074
 
6055
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6075
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6056
6076
 
6057
6077
  /*
6058
6078
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6383,7 +6403,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6383
6403
  return baseAccount;
6384
6404
  }
6385
6405
 
6386
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6406
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6387
6407
  /*
6388
6408
  * Copyright (c) Microsoft Corporation. All rights reserved.
6389
6409
  * Licensed under the MIT License.
@@ -6401,7 +6421,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
6401
6421
  }
6402
6422
  }
6403
6423
 
6404
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6424
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6405
6425
 
6406
6426
  /*
6407
6427
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6636,7 +6656,7 @@ class AuthorizationCodeClient extends BaseClient {
6636
6656
  }
6637
6657
  }
6638
6658
 
6639
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6659
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6640
6660
 
6641
6661
  /*
6642
6662
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6845,7 +6865,7 @@ class RefreshTokenClient extends BaseClient {
6845
6865
  }
6846
6866
  }
6847
6867
 
6848
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6868
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6849
6869
 
6850
6870
  /*
6851
6871
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6943,7 +6963,7 @@ class SilentFlowClient extends BaseClient {
6943
6963
  }
6944
6964
  }
6945
6965
 
6946
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6966
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6947
6967
 
6948
6968
  /*
6949
6969
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6958,7 +6978,7 @@ const StubbedNetworkModule = {
6958
6978
  },
6959
6979
  };
6960
6980
 
6961
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6981
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6962
6982
 
6963
6983
  /*
6964
6984
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7182,7 +7202,7 @@ function extractLoginHint(account) {
7182
7202
  return account.idTokenClaims?.login_hint || null;
7183
7203
  }
7184
7204
 
7185
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7205
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7186
7206
 
7187
7207
  /*
7188
7208
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7445,7 +7465,7 @@ class ServerTelemetryManager {
7445
7465
  }
7446
7466
  }
7447
7467
 
7448
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7468
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7449
7469
  /*
7450
7470
  * Copyright (c) Microsoft Corporation. All rights reserved.
7451
7471
  * Licensed under the MIT License.
@@ -7453,7 +7473,7 @@ class ServerTelemetryManager {
7453
7473
  const missingKidError = "missing_kid_error";
7454
7474
  const missingAlgError = "missing_alg_error";
7455
7475
 
7456
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7476
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7457
7477
 
7458
7478
  /*
7459
7479
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7478,7 +7498,7 @@ function createJoseHeaderError(code) {
7478
7498
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
7479
7499
  }
7480
7500
 
7481
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7501
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7482
7502
 
7483
7503
  /*
7484
7504
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7851,7 +7871,7 @@ function ensureArgumentIsNotEmptyString(argName, argValue, correlationId) {
7851
7871
 
7852
7872
  /* eslint-disable header/header */
7853
7873
  const name = "@azure/msal-browser";
7854
- const version = "4.15.0";
7874
+ const version = "4.16.0";
7855
7875
 
7856
7876
  /*
7857
7877
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10398,6 +10418,35 @@ async function initializeSilentRequest(request, account, config, performanceClie
10398
10418
  account: account,
10399
10419
  forceRefresh: request.forceRefresh || false,
10400
10420
  };
10421
+ }
10422
+ /**
10423
+ * Validates that the combination of request method, protocol mode and authorize body parameters is correct.
10424
+ * Returns the validated or defaulted HTTP method or throws if the configured combination is invalid.
10425
+ * @param interactionRequest
10426
+ * @param protocolMode
10427
+ * @returns
10428
+ */
10429
+ function validateRequestMethod(interactionRequest, protocolMode) {
10430
+ let httpMethod;
10431
+ const requestMethod = interactionRequest.httpMethod;
10432
+ if (protocolMode === ProtocolMode.EAR) {
10433
+ // Don't override httpMethod if it is already set, default to POST if not set
10434
+ httpMethod = requestMethod || HttpMethod$1.POST;
10435
+ // Validate that method is not GET if protocol mode is EAR
10436
+ if (httpMethod !== HttpMethod$1.POST) {
10437
+ throw createClientConfigurationError(invalidRequestMethodForEAR);
10438
+ }
10439
+ }
10440
+ else {
10441
+ // For non-EAR protocol modes, default to GET if httpMethod is not set
10442
+ httpMethod = requestMethod || HttpMethod$1.GET;
10443
+ }
10444
+ // Regardless of protocolMode, if there are authorizePostBodyParameters, validate the request method is POST
10445
+ if (interactionRequest.authorizePostBodyParameters &&
10446
+ httpMethod !== HttpMethod$1.POST) {
10447
+ throw createClientConfigurationError(invalidAuthorizePostBodyParameters);
10448
+ }
10449
+ return httpMethod;
10401
10450
  }
10402
10451
 
10403
10452
  /*
@@ -10574,7 +10623,7 @@ class StandardInteractionClient extends BaseInteractionClient {
10574
10623
  };
10575
10624
  const state = ProtocolUtils.setRequestState(this.browserCrypto, (request && request.state) || Constants.EMPTY_STRING, browserState);
10576
10625
  const baseRequest = await invokeAsync(initializeBaseRequest, PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)({ ...request, correlationId: this.correlationId }, this.config, this.performanceClient, this.logger);
10577
- const validatedRequest = {
10626
+ const interactionRequest = {
10578
10627
  ...baseRequest,
10579
10628
  redirectUri: redirectUri,
10580
10629
  state: state,
@@ -10582,6 +10631,10 @@ class StandardInteractionClient extends BaseInteractionClient {
10582
10631
  responseMode: this.config.auth.OIDCOptions
10583
10632
  .serverResponseType,
10584
10633
  };
10634
+ const validatedRequest = {
10635
+ ...interactionRequest,
10636
+ httpMethod: validateRequestMethod(interactionRequest, this.config.auth.protocolMode),
10637
+ };
10585
10638
  // Skip active account lookup if either login hint or session id is set
10586
10639
  if (request.loginHint || request.sid) {
10587
10640
  return validatedRequest;
@@ -15494,6 +15547,19 @@ async function getEARForm(frame, config, authority, request, logger, performance
15494
15547
  const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
15495
15548
  return createForm(frame, url, parameters);
15496
15549
  }
15550
+ /**
15551
+ * Gets the form that will be posted to /authorize with request parameters when using POST method
15552
+ */
15553
+ async function getCodeForm(frame, config, authority, request, logger, performanceClient) {
15554
+ const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
15555
+ addResponseType(parameters, OAuthResponseType.CODE);
15556
+ addCodeChallengeParams(parameters, request.codeChallenge, request.codeChallengeMethod || Constants.S256_CODE_CHALLENGE_METHOD);
15557
+ addPostBodyParameters(parameters, request.authorizePostBodyParameters || {});
15558
+ const queryParams = new Map();
15559
+ addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
15560
+ const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
15561
+ return createForm(frame, url, parameters);
15562
+ }
15497
15563
  /**
15498
15564
  * Creates form element in the provided document with auth parameters in the post body
15499
15565
  * @param frame
@@ -16460,9 +16526,10 @@ class PopupClient extends StandardInteractionClient {
16460
16526
  * @param pkceCodes
16461
16527
  */
16462
16528
  acquireToken(request, pkceCodes) {
16529
+ let popupParams = undefined;
16463
16530
  try {
16464
16531
  const popupName = this.generatePopupName(request.scopes || OIDC_DEFAULT_SCOPES, request.authority || this.config.auth.authority);
16465
- const popupParams = {
16532
+ popupParams = {
16466
16533
  popupName,
16467
16534
  popupWindowAttributes: request.popupWindowAttributes || {},
16468
16535
  popupWindowParent: request.popupWindowParent ?? window,
@@ -16475,10 +16542,15 @@ class PopupClient extends StandardInteractionClient {
16475
16542
  return this.acquireTokenPopupAsync(request, popupParams, pkceCodes);
16476
16543
  }
16477
16544
  else {
16545
+ // Pre-validate request method to avoid opening popup if the request is invalid
16546
+ const validatedRequest = {
16547
+ ...request,
16548
+ httpMethod: validateRequestMethod(request, this.config.auth.protocolMode),
16549
+ };
16478
16550
  // asyncPopups flag is set to false. Opens popup before acquiring token.
16479
16551
  this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");
16480
16552
  popupParams.popup = this.openSizedPopup("about:blank", popupParams);
16481
- return this.acquireTokenPopupAsync(request, popupParams, pkceCodes);
16553
+ return this.acquireTokenPopupAsync(validatedRequest, popupParams, pkceCodes);
16482
16554
  }
16483
16555
  }
16484
16556
  catch (e) {
@@ -16570,15 +16642,20 @@ class PopupClient extends StandardInteractionClient {
16570
16642
  requestExtraQueryParameters: popupRequest.extraQueryParameters,
16571
16643
  account: popupRequest.account,
16572
16644
  });
16573
- // Create acquire token url.
16574
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, popupRequest, this.logger, this.performanceClient);
16575
- // Show the UI once the url has been created. Get the window handle for the popup.
16576
- const popupWindow = this.initiateAuthRequest(navigateUrl, popupParams);
16577
- this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, { popupWindow }, null);
16578
- // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16579
- const responseString = await this.monitorPopupForHash(popupWindow, popupParams.popupWindowParent);
16580
- const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
16581
- return await invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
16645
+ if (popupRequest.httpMethod === HttpMethod$1.POST) {
16646
+ return await this.executeCodeFlowWithPost(popupRequest, popupParams, authClient, pkce.verifier);
16647
+ }
16648
+ else {
16649
+ // Create acquire token url.
16650
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, popupRequest, this.logger, this.performanceClient);
16651
+ // Show the UI once the url has been created. Get the window handle for the popup.
16652
+ const popupWindow = this.initiateAuthRequest(navigateUrl, popupParams);
16653
+ this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, { popupWindow }, null);
16654
+ // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16655
+ const responseString = await this.monitorPopupForHash(popupWindow, popupParams.popupWindowParent);
16656
+ const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
16657
+ return await invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
16658
+ }
16582
16659
  }
16583
16660
  catch (e) {
16584
16661
  // Close the synchronous popup if an error is thrown before the window unload event is registered
@@ -16616,6 +16693,23 @@ class PopupClient extends StandardInteractionClient {
16616
16693
  const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
16617
16694
  return invokeAsync(handleResponseEAR, PerformanceEvents.HandleResponseEar, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, ApiId.acquireTokenPopup, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
16618
16695
  }
16696
+ async executeCodeFlowWithPost(request, popupParams, authClient, pkceVerifier) {
16697
+ const correlationId = request.correlationId;
16698
+ // Get the frame handle for the silent request
16699
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)({
16700
+ requestAuthority: request.authority,
16701
+ requestAzureCloudOptions: request.azureCloudOptions,
16702
+ requestExtraQueryParameters: request.extraQueryParameters,
16703
+ account: request.account,
16704
+ });
16705
+ const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
16706
+ const form = await getCodeForm(popupWindow.document, this.config, discoveredAuthority, request, this.logger, this.performanceClient);
16707
+ form.submit();
16708
+ // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16709
+ const responseString = await invokeAsync(this.monitorPopupForHash.bind(this), PerformanceEvents.SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupWindow, popupParams.popupWindowParent);
16710
+ const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
16711
+ return invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
16712
+ }
16619
16713
  /**
16620
16714
  *
16621
16715
  * @param validRequest
@@ -16967,18 +17061,23 @@ class RedirectClient extends StandardInteractionClient {
16967
17061
  };
16968
17062
  this.browserStorage.cacheAuthorizeRequest(redirectRequest, pkceCodes.verifier);
16969
17063
  try {
16970
- // Initialize the client
16971
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
16972
- serverTelemetryManager,
16973
- requestAuthority: redirectRequest.authority,
16974
- requestAzureCloudOptions: redirectRequest.azureCloudOptions,
16975
- requestExtraQueryParameters: redirectRequest.extraQueryParameters,
16976
- account: redirectRequest.account,
16977
- });
16978
- // Create acquire token url.
16979
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, request.correlationId)(this.config, authClient.authority, redirectRequest, this.logger, this.performanceClient);
16980
- // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.
16981
- return await this.initiateAuthRequest(navigateUrl, onRedirectNavigate);
17064
+ if (redirectRequest.httpMethod === HttpMethod$1.POST) {
17065
+ return await this.executeCodeFlowWithPost(redirectRequest);
17066
+ }
17067
+ else {
17068
+ // Initialize the client
17069
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
17070
+ serverTelemetryManager,
17071
+ requestAuthority: redirectRequest.authority,
17072
+ requestAzureCloudOptions: redirectRequest.azureCloudOptions,
17073
+ requestExtraQueryParameters: redirectRequest.extraQueryParameters,
17074
+ account: redirectRequest.account,
17075
+ });
17076
+ // Create acquire token url.
17077
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, request.correlationId)(this.config, authClient.authority, redirectRequest, this.logger, this.performanceClient);
17078
+ // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.
17079
+ return await this.initiateAuthRequest(navigateUrl, onRedirectNavigate);
17080
+ }
16982
17081
  }
16983
17082
  catch (e) {
16984
17083
  if (e instanceof AuthError) {
@@ -17015,6 +17114,28 @@ class RedirectClient extends StandardInteractionClient {
17015
17114
  }, this.config.system.redirectNavigationTimeout);
17016
17115
  });
17017
17116
  }
17117
+ /**
17118
+ * Executes classic Authorization Code flow with a POST request.
17119
+ * @param request
17120
+ */
17121
+ async executeCodeFlowWithPost(request) {
17122
+ const correlationId = request.correlationId;
17123
+ // Get the frame handle for the silent request
17124
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)({
17125
+ requestAuthority: request.authority,
17126
+ requestAzureCloudOptions: request.azureCloudOptions,
17127
+ requestExtraQueryParameters: request.extraQueryParameters,
17128
+ account: request.account,
17129
+ });
17130
+ this.browserStorage.cacheAuthorizeRequest(request);
17131
+ const form = await getCodeForm(document, this.config, discoveredAuthority, request, this.logger, this.performanceClient);
17132
+ form.submit();
17133
+ return new Promise((resolve, reject) => {
17134
+ setTimeout(() => {
17135
+ reject(createBrowserAuthError(timedOut, "failed_to_redirect"));
17136
+ }, this.config.system.redirectNavigationTimeout);
17137
+ });
17138
+ }
17018
17139
  /**
17019
17140
  * Checks if navigateToLoginRequestUrl is set, and:
17020
17141
  * - if true, performs logic to cache and navigate
@@ -17325,6 +17446,15 @@ async function initiateCodeRequest(requestUrl, performanceClient, logger, correl
17325
17446
  }
17326
17447
  return invoke(loadFrameSync, PerformanceEvents.SilentHandlerLoadFrameSync, logger, performanceClient, correlationId)(requestUrl);
17327
17448
  }
17449
+ async function initiateCodeFlowWithPost(config, authority, request, logger, performanceClient) {
17450
+ const frame = createHiddenIframe();
17451
+ if (!frame.contentDocument) {
17452
+ throw "No document associated with iframe!";
17453
+ }
17454
+ const form = await getCodeForm(frame.contentDocument, config, authority, request, logger, performanceClient);
17455
+ form.submit();
17456
+ return frame;
17457
+ }
17328
17458
  async function initiateEarRequest(config, authority, request, logger, performanceClient) {
17329
17459
  const frame = createHiddenIframe();
17330
17460
  if (!frame.contentDocument) {
@@ -17573,10 +17703,16 @@ class SilentIframeClient extends StandardInteractionClient {
17573
17703
  ...request,
17574
17704
  codeChallenge: pkceCodes.challenge,
17575
17705
  };
17576
- // Create authorize request url
17577
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
17578
- // Get the frame handle for the silent request
17579
- const msalFrame = await invokeAsync(initiateCodeRequest, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(navigateUrl, this.performanceClient, this.logger, correlationId, this.config.system.navigateFrameWait);
17706
+ let msalFrame;
17707
+ if (request.httpMethod === HttpMethod$1.POST) {
17708
+ msalFrame = await invokeAsync(initiateCodeFlowWithPost, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
17709
+ }
17710
+ else {
17711
+ // Create authorize request url
17712
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
17713
+ // Get the frame handle for the silent request
17714
+ msalFrame = await invokeAsync(initiateCodeRequest, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(navigateUrl, this.performanceClient, this.logger, correlationId, this.config.system.navigateFrameWait);
17715
+ }
17580
17716
  const responseType = this.config.auth.OIDCOptions.serverResponseType;
17581
17717
  // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
17582
17718
  const responseString = await invokeAsync(monitorIframeForHash, PerformanceEvents.SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(msalFrame, this.config.system.iframeHashTimeout, this.config.system.pollIntervalMilliseconds, this.performanceClient, this.logger, correlationId, responseType);