@azure/msal-browser 4.15.0 → 4.18.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.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +15 -3
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/custom-auth-path/cache/AccountManager.mjs +1 -1
- package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
- package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/TokenCache.mjs +1 -1
- package/dist/custom-auth-path/config/Configuration.mjs +1 -1
- package/dist/custom-auth-path/controllers/ControllerFactory.mjs +1 -1
- package/dist/custom-auth-path/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.mjs +1 -1
- package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
- package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
- package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthActionInputs.d.ts +3 -0
- package/dist/custom-auth-path/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +8 -2
- package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts +5 -0
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +10 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +4 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts +1 -0
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +18 -2
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +8 -4
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts +5 -0
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +8 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCredentialResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +2 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +6 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +2 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts +1 -0
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +10 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts +3 -0
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
- package/dist/custom-auth-path/event/EventType.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.d.ts +2 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.mjs +43 -14
- package/dist/custom-auth-path/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts +5 -0
- package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +42 -15
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +13 -7
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +7 -3
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts +1 -0
- package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +12 -3
- package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
- package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
- package/dist/custom-auth-path/packageMetadata.mjs +2 -2
- package/dist/custom-auth-path/protocol/Authorize.d.ts +4 -0
- package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
- package/dist/custom-auth-path/protocol/Authorize.mjs +15 -2
- package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
- package/dist/custom-auth-path/request/RequestHelpers.d.ts +11 -1
- package/dist/custom-auth-path/request/RequestHelpers.d.ts.map +1 -1
- package/dist/custom-auth-path/request/RequestHelpers.mjs +32 -3
- package/dist/custom-auth-path/request/RequestHelpers.mjs.map +1 -1
- package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/custom_auth/CustomAuthActionInputs.d.ts +3 -0
- package/dist/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts +5 -0
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.d.ts.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/dist/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts +5 -0
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts +1 -0
- package/dist/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts +3 -0
- package/dist/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts.map +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
- package/dist/interaction_client/PopupClient.d.ts +2 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +43 -14
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +5 -0
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +42 -15
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +13 -7
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +7 -3
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts +1 -0
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +12 -3
- package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +4 -0
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +15 -2
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/request/RequestHelpers.d.ts +11 -1
- package/dist/request/RequestHelpers.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +32 -3
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/lib/custom-auth-path/msal-custom-auth.cjs +292 -96
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/CustomAuthActionInputs.d.ts +3 -0
- package/lib/custom-auth-path/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/custom-auth-path/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts +5 -0
- package/lib/custom-auth-path/types/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/network_client/custom_auth_api/SignInApiClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts +1 -0
- package/lib/custom-auth-path/types/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/lib/custom-auth-path/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/get_account/auth_flow/CustomAuthAccountData.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts +5 -0
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/state/SignInContinuationState.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts +1 -0
- package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts +3 -0
- package/lib/custom-auth-path/types/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts +2 -1
- package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts +5 -0
- package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts +1 -0
- package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
- package/lib/custom-auth-path/types/protocol/Authorize.d.ts +4 -0
- package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/custom-auth-path/types/request/RequestHelpers.d.ts +11 -1
- package/lib/custom-auth-path/types/request/RequestHelpers.d.ts.map +1 -1
- package/lib/msal-browser.cjs +256 -98
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +256 -98
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +68 -68
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/custom_auth/CustomAuthActionInputs.d.ts +3 -0
- package/lib/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/lib/types/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts +5 -0
- package/lib/types/custom_auth/core/auth_flow/AuthFlowErrorBase.d.ts.map +1 -1
- package/lib/types/custom_auth/core/network_client/custom_auth_api/SignInApiClient.d.ts.map +1 -1
- package/lib/types/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts +1 -0
- package/lib/types/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.d.ts.map +1 -1
- package/lib/types/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/lib/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/lib/types/custom_auth/get_account/auth_flow/CustomAuthAccountData.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts +5 -0
- package/lib/types/custom_auth/sign_in/auth_flow/error_type/SignInError.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/auth_flow/state/SignInContinuationState.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts +1 -0
- package/lib/types/custom_auth/sign_in/auth_flow/state/SignInStateParameters.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts +3 -0
- package/lib/types/custom_auth/sign_in/interaction_client/parameter/SignInParams.d.ts.map +1 -1
- package/lib/types/interaction_client/PopupClient.d.ts +2 -1
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts +5 -0
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_handler/SilentHandler.d.ts +1 -0
- package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts +4 -0
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/request/RequestHelpers.d.ts +11 -1
- package/lib/types/request/RequestHelpers.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/controllers/NestedAppAuthController.ts +18 -2
- package/src/custom_auth/CustomAuthActionInputs.ts +3 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +18 -10
- package/src/custom_auth/core/auth_flow/AuthFlowErrorBase.ts +12 -0
- package/src/custom_auth/core/network_client/custom_auth_api/SignInApiClient.ts +3 -0
- package/src/custom_auth/core/network_client/custom_auth_api/types/ApiRequestTypes.ts +1 -0
- package/src/custom_auth/core/utils/ArgumentValidator.ts +22 -0
- package/src/custom_auth/get_account/auth_flow/CustomAuthAccountData.ts +24 -9
- package/src/custom_auth/sign_in/auth_flow/error_type/SignInError.ts +8 -0
- package/src/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.ts +1 -0
- package/src/custom_auth/sign_in/auth_flow/state/SignInContinuationState.ts +10 -0
- package/src/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.ts +1 -0
- package/src/custom_auth/sign_in/auth_flow/state/SignInStateParameters.ts +1 -0
- package/src/custom_auth/sign_in/interaction_client/SignInClient.ts +9 -0
- package/src/custom_auth/sign_in/interaction_client/parameter/SignInParams.ts +3 -0
- package/src/interaction_client/PopupClient.ts +161 -63
- package/src/interaction_client/RedirectClient.ts +86 -35
- package/src/interaction_client/SilentIframeClient.ts +49 -28
- package/src/interaction_client/StandardInteractionClient.ts +13 -2
- package/src/interaction_handler/SilentHandler.ts +24 -1
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +48 -0
- package/src/request/RequestHelpers.ts +45 -0
|
@@ -90,6 +90,7 @@ export class SignInApiClient extends BaseApiClient {
|
|
|
90
90
|
grant_type: GrantType.PASSWORD,
|
|
91
91
|
scope: params.scope,
|
|
92
92
|
password: params.password,
|
|
93
|
+
...(params.claims && { claims: params.claims }),
|
|
93
94
|
},
|
|
94
95
|
params.telemetryManager,
|
|
95
96
|
params.correlationId
|
|
@@ -105,6 +106,7 @@ export class SignInApiClient extends BaseApiClient {
|
|
|
105
106
|
scope: params.scope,
|
|
106
107
|
oob: params.oob,
|
|
107
108
|
grant_type: GrantType.OOB,
|
|
109
|
+
...(params.claims && { claims: params.claims }),
|
|
108
110
|
},
|
|
109
111
|
params.telemetryManager,
|
|
110
112
|
params.correlationId
|
|
@@ -121,6 +123,7 @@ export class SignInApiClient extends BaseApiClient {
|
|
|
121
123
|
scope: params.scope,
|
|
122
124
|
grant_type: GrantType.CONTINUATION_TOKEN,
|
|
123
125
|
client_info: true,
|
|
126
|
+
...(params.claims && { claims: params.claims }),
|
|
124
127
|
},
|
|
125
128
|
params.telemetryManager,
|
|
126
129
|
params.correlationId
|
|
@@ -19,6 +19,7 @@ export interface SignInChallengeRequest extends ApiRequestBase {
|
|
|
19
19
|
interface SignInTokenRequestBase extends ApiRequestBase {
|
|
20
20
|
continuation_token: string;
|
|
21
21
|
scope: string;
|
|
22
|
+
claims?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export interface SignInPasswordTokenRequest extends SignInTokenRequestBase {
|
|
@@ -24,3 +24,25 @@ export function ensureArgumentIsNotEmptyString(
|
|
|
24
24
|
throw new InvalidArgumentError(argName, correlationId);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
export function ensureArgumentIsJSONString(
|
|
29
|
+
argName: string,
|
|
30
|
+
argValue: string,
|
|
31
|
+
correlationId?: string
|
|
32
|
+
): void {
|
|
33
|
+
try {
|
|
34
|
+
const parsed = JSON.parse(argValue);
|
|
35
|
+
if (
|
|
36
|
+
typeof parsed !== "object" ||
|
|
37
|
+
parsed === null ||
|
|
38
|
+
Array.isArray(parsed)
|
|
39
|
+
) {
|
|
40
|
+
throw new InvalidArgumentError(argName, correlationId);
|
|
41
|
+
}
|
|
42
|
+
} catch (e) {
|
|
43
|
+
if (e instanceof SyntaxError) {
|
|
44
|
+
throw new InvalidArgumentError(argName, correlationId);
|
|
45
|
+
}
|
|
46
|
+
throw e; // Rethrow unexpected errors
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -18,10 +18,7 @@ import {
|
|
|
18
18
|
TokenClaims,
|
|
19
19
|
} from "@azure/msal-common/browser";
|
|
20
20
|
import { SilentRequest } from "../../../request/SilentRequest.js";
|
|
21
|
-
import
|
|
22
|
-
ensureArgumentIsNotEmptyString,
|
|
23
|
-
ensureArgumentIsNotNullOrUndefined,
|
|
24
|
-
} from "../../core/utils/ArgumentValidator.js";
|
|
21
|
+
import * as ArgumentValidator from "../../core/utils/ArgumentValidator.js";
|
|
25
22
|
|
|
26
23
|
/*
|
|
27
24
|
* Account information.
|
|
@@ -34,8 +31,15 @@ export class CustomAuthAccountData {
|
|
|
34
31
|
private readonly logger: Logger,
|
|
35
32
|
private readonly correlationId: string
|
|
36
33
|
) {
|
|
37
|
-
ensureArgumentIsNotEmptyString(
|
|
38
|
-
|
|
34
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
35
|
+
"correlationId",
|
|
36
|
+
correlationId
|
|
37
|
+
);
|
|
38
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
39
|
+
"account",
|
|
40
|
+
account,
|
|
41
|
+
correlationId
|
|
42
|
+
);
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -107,12 +111,20 @@ export class CustomAuthAccountData {
|
|
|
107
111
|
accessTokenRetrievalInputs: AccessTokenRetrievalInputs
|
|
108
112
|
): Promise<GetAccessTokenResult> {
|
|
109
113
|
try {
|
|
110
|
-
ensureArgumentIsNotNullOrUndefined(
|
|
114
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
111
115
|
"accessTokenRetrievalInputs",
|
|
112
116
|
accessTokenRetrievalInputs,
|
|
113
117
|
this.correlationId
|
|
114
118
|
);
|
|
115
119
|
|
|
120
|
+
if (accessTokenRetrievalInputs.claims) {
|
|
121
|
+
ArgumentValidator.ensureArgumentIsJSONString(
|
|
122
|
+
"accessTokenRetrievalInputs.claims",
|
|
123
|
+
accessTokenRetrievalInputs.claims,
|
|
124
|
+
this.correlationId
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
116
128
|
this.logger.verbose("Getting current account.", this.correlationId);
|
|
117
129
|
|
|
118
130
|
const currentAccount = this.cacheClient.getCurrentAccount(
|
|
@@ -133,7 +145,8 @@ export class CustomAuthAccountData {
|
|
|
133
145
|
const commonSilentFlowRequest = this.createCommonSilentFlowRequest(
|
|
134
146
|
currentAccount,
|
|
135
147
|
accessTokenRetrievalInputs.forceRefresh,
|
|
136
|
-
newScopes
|
|
148
|
+
newScopes,
|
|
149
|
+
accessTokenRetrievalInputs.claims
|
|
137
150
|
);
|
|
138
151
|
const result = await this.cacheClient.acquireToken(
|
|
139
152
|
commonSilentFlowRequest
|
|
@@ -158,7 +171,8 @@ export class CustomAuthAccountData {
|
|
|
158
171
|
private createCommonSilentFlowRequest(
|
|
159
172
|
accountInfo: AccountInfo,
|
|
160
173
|
forceRefresh: boolean = false,
|
|
161
|
-
requestScopes: Array<string
|
|
174
|
+
requestScopes: Array<string>,
|
|
175
|
+
claims?: string
|
|
162
176
|
): CommonSilentFlowRequest {
|
|
163
177
|
const silentRequest: SilentRequest = {
|
|
164
178
|
authority: this.config.auth.authority,
|
|
@@ -171,6 +185,7 @@ export class CustomAuthAccountData {
|
|
|
171
185
|
accessToken: true,
|
|
172
186
|
refreshToken: true,
|
|
173
187
|
},
|
|
188
|
+
...(claims && { claims: claims }),
|
|
174
189
|
};
|
|
175
190
|
|
|
176
191
|
return {
|
|
@@ -31,6 +31,14 @@ export class SignInError extends AuthActionErrorBase {
|
|
|
31
31
|
return this.isPasswordIncorrectError();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Checks if the error is due to password reset being required.
|
|
36
|
+
* @returns true if the error is due to password reset being required, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
isPasswordResetRequired(): boolean {
|
|
39
|
+
return this.isPasswordResetRequiredError();
|
|
40
|
+
}
|
|
41
|
+
|
|
34
42
|
/**
|
|
35
43
|
* Checks if the error is due to the provided challenge type is not supported.
|
|
36
44
|
* @returns {boolean} True if the error is due to the provided challenge type is not supported, false otherwise.
|
|
@@ -37,6 +37,7 @@ export class SignInCodeRequiredState extends SignInState<SignInCodeRequiredState
|
|
|
37
37
|
continuationToken: this.stateParameters.continuationToken ?? "",
|
|
38
38
|
code: code,
|
|
39
39
|
username: this.stateParameters.username,
|
|
40
|
+
claims: this.stateParameters.claims,
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
this.stateParameters.logger.verbose(
|
|
@@ -10,6 +10,7 @@ import { SignInWithContinuationTokenInputs } from "../../../CustomAuthActionInpu
|
|
|
10
10
|
import { SignInContinuationStateParameters } from "./SignInStateParameters.js";
|
|
11
11
|
import { SignInState } from "./SignInState.js";
|
|
12
12
|
import { SignInCompletedState } from "./SignInCompletedState.js";
|
|
13
|
+
import * as ArgumentValidator from "../../../core/utils/ArgumentValidator.js";
|
|
13
14
|
|
|
14
15
|
/*
|
|
15
16
|
* Sign-in continuation state.
|
|
@@ -24,6 +25,14 @@ export class SignInContinuationState extends SignInState<SignInContinuationState
|
|
|
24
25
|
signInWithContinuationTokenInputs?: SignInWithContinuationTokenInputs
|
|
25
26
|
): Promise<SignInResult> {
|
|
26
27
|
try {
|
|
28
|
+
if (signInWithContinuationTokenInputs?.claims) {
|
|
29
|
+
ArgumentValidator.ensureArgumentIsJSONString(
|
|
30
|
+
"signInWithContinuationTokenInputs.claims",
|
|
31
|
+
signInWithContinuationTokenInputs.claims,
|
|
32
|
+
this.stateParameters.correlationId
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
const continuationTokenParams: SignInContinuationTokenParams = {
|
|
28
37
|
clientId: this.stateParameters.config.auth.clientId,
|
|
29
38
|
correlationId: this.stateParameters.correlationId,
|
|
@@ -33,6 +42,7 @@ export class SignInContinuationState extends SignInState<SignInContinuationState
|
|
|
33
42
|
continuationToken: this.stateParameters.continuationToken ?? "",
|
|
34
43
|
username: this.stateParameters.username,
|
|
35
44
|
signInScenario: this.stateParameters.signInScenario,
|
|
45
|
+
claims: signInWithContinuationTokenInputs?.claims,
|
|
36
46
|
};
|
|
37
47
|
|
|
38
48
|
this.stateParameters.logger.verbose(
|
|
@@ -34,6 +34,7 @@ export class SignInPasswordRequiredState extends SignInState<SignInPasswordRequi
|
|
|
34
34
|
continuationToken: this.stateParameters.continuationToken ?? "",
|
|
35
35
|
password: password,
|
|
36
36
|
username: this.stateParameters.username,
|
|
37
|
+
claims: this.stateParameters.claims,
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
this.stateParameters.logger.verbose(
|
|
@@ -195,6 +195,9 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
195
195
|
scope: scopes.join(" "),
|
|
196
196
|
correlationId: parameters.correlationId,
|
|
197
197
|
telemetryManager: telemetryManager,
|
|
198
|
+
...(parameters.claims && {
|
|
199
|
+
claims: parameters.claims,
|
|
200
|
+
}),
|
|
198
201
|
};
|
|
199
202
|
|
|
200
203
|
return this.performTokenRequest(
|
|
@@ -230,6 +233,9 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
230
233
|
scope: scopes.join(" "),
|
|
231
234
|
correlationId: parameters.correlationId,
|
|
232
235
|
telemetryManager: telemetryManager,
|
|
236
|
+
...(parameters.claims && {
|
|
237
|
+
claims: parameters.claims,
|
|
238
|
+
}),
|
|
233
239
|
};
|
|
234
240
|
|
|
235
241
|
return this.performTokenRequest(
|
|
@@ -263,6 +269,9 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
263
269
|
correlationId: parameters.correlationId,
|
|
264
270
|
telemetryManager: telemetryManager,
|
|
265
271
|
scope: scopes.join(" "),
|
|
272
|
+
...(parameters.claims && {
|
|
273
|
+
claims: parameters.claims,
|
|
274
|
+
}),
|
|
266
275
|
};
|
|
267
276
|
|
|
268
277
|
// Call token endpoint.
|
|
@@ -24,16 +24,19 @@ export interface SignInSubmitCodeParams extends SignInParamsBase {
|
|
|
24
24
|
continuationToken: string;
|
|
25
25
|
code: string;
|
|
26
26
|
scopes: Array<string>;
|
|
27
|
+
claims?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface SignInSubmitPasswordParams extends SignInParamsBase {
|
|
30
31
|
continuationToken: string;
|
|
31
32
|
password: string;
|
|
32
33
|
scopes: Array<string>;
|
|
34
|
+
claims?: string;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
export interface SignInContinuationTokenParams extends SignInParamsBase {
|
|
36
38
|
continuationToken: string;
|
|
37
39
|
signInScenario: SignInScenarioType;
|
|
38
40
|
scopes: Array<string>;
|
|
41
|
+
claims?: string;
|
|
39
42
|
}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
invoke,
|
|
20
20
|
PkceCodes,
|
|
21
21
|
CommonAuthorizationUrlRequest,
|
|
22
|
+
HttpMethod,
|
|
22
23
|
} from "@azure/msal-common/browser";
|
|
23
24
|
import { StandardInteractionClient } from "./StandardInteractionClient.js";
|
|
24
25
|
import { EventType } from "../event/EventType.js";
|
|
@@ -48,6 +49,7 @@ import { generatePkceCodes } from "../crypto/PkceGenerator.js";
|
|
|
48
49
|
import { isPlatformAuthAllowed } from "../broker/nativeBroker/PlatformAuthProvider.js";
|
|
49
50
|
import { generateEarKey } from "../crypto/BrowserCrypto.js";
|
|
50
51
|
import { IPlatformAuthHandler } from "../broker/nativeBroker/IPlatformAuthHandler.js";
|
|
52
|
+
import { validateRequestMethod } from "../request/RequestHelpers.js";
|
|
51
53
|
|
|
52
54
|
export type PopupParams = {
|
|
53
55
|
popup?: Window | null;
|
|
@@ -98,12 +100,13 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
98
100
|
request: PopupRequest,
|
|
99
101
|
pkceCodes?: PkceCodes
|
|
100
102
|
): Promise<AuthenticationResult> {
|
|
103
|
+
let popupParams: PopupParams | undefined = undefined;
|
|
101
104
|
try {
|
|
102
105
|
const popupName = this.generatePopupName(
|
|
103
106
|
request.scopes || OIDC_DEFAULT_SCOPES,
|
|
104
107
|
request.authority || this.config.auth.authority
|
|
105
108
|
);
|
|
106
|
-
|
|
109
|
+
popupParams = {
|
|
107
110
|
popupName,
|
|
108
111
|
popupWindowAttributes: request.popupWindowAttributes || {},
|
|
109
112
|
popupWindowParent: request.popupWindowParent ?? window,
|
|
@@ -124,6 +127,14 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
124
127
|
pkceCodes
|
|
125
128
|
);
|
|
126
129
|
} else {
|
|
130
|
+
// Pre-validate request method to avoid opening popup if the request is invalid
|
|
131
|
+
const validatedRequest: PopupRequest = {
|
|
132
|
+
...request,
|
|
133
|
+
httpMethod: validateRequestMethod(
|
|
134
|
+
request,
|
|
135
|
+
this.config.auth.protocolMode
|
|
136
|
+
),
|
|
137
|
+
};
|
|
127
138
|
// asyncPopups flag is set to false. Opens popup before acquiring token.
|
|
128
139
|
this.logger.verbose(
|
|
129
140
|
"asyncPopup set to false, opening popup before acquiring token"
|
|
@@ -133,7 +144,7 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
133
144
|
popupParams
|
|
134
145
|
);
|
|
135
146
|
return this.acquireTokenPopupAsync(
|
|
136
|
-
|
|
147
|
+
validatedRequest,
|
|
137
148
|
popupParams,
|
|
138
149
|
pkceCodes
|
|
139
150
|
);
|
|
@@ -286,71 +297,80 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
286
297
|
account: popupRequest.account,
|
|
287
298
|
});
|
|
288
299
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
if (popupRequest.httpMethod === HttpMethod.POST) {
|
|
301
|
+
return await this.executeCodeFlowWithPost(
|
|
302
|
+
popupRequest,
|
|
303
|
+
popupParams,
|
|
304
|
+
authClient,
|
|
305
|
+
pkce.verifier
|
|
306
|
+
);
|
|
307
|
+
} else {
|
|
308
|
+
// Create acquire token url.
|
|
309
|
+
const navigateUrl = await invokeAsync(
|
|
310
|
+
Authorize.getAuthCodeRequestUrl,
|
|
311
|
+
PerformanceEvents.GetAuthCodeUrl,
|
|
312
|
+
this.logger,
|
|
313
|
+
this.performanceClient,
|
|
314
|
+
correlationId
|
|
315
|
+
)(
|
|
316
|
+
this.config,
|
|
317
|
+
authClient.authority,
|
|
318
|
+
popupRequest,
|
|
319
|
+
this.logger,
|
|
320
|
+
this.performanceClient
|
|
321
|
+
);
|
|
303
322
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
323
|
+
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
324
|
+
const popupWindow: Window = this.initiateAuthRequest(
|
|
325
|
+
navigateUrl,
|
|
326
|
+
popupParams
|
|
327
|
+
);
|
|
328
|
+
this.eventHandler.emitEvent(
|
|
329
|
+
EventType.POPUP_OPENED,
|
|
330
|
+
InteractionType.Popup,
|
|
331
|
+
{ popupWindow },
|
|
332
|
+
null
|
|
333
|
+
);
|
|
315
334
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
335
|
+
// Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
336
|
+
const responseString = await this.monitorPopupForHash(
|
|
337
|
+
popupWindow,
|
|
338
|
+
popupParams.popupWindowParent
|
|
339
|
+
);
|
|
321
340
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
341
|
+
const serverParams = invoke(
|
|
342
|
+
ResponseHandler.deserializeResponse,
|
|
343
|
+
PerformanceEvents.DeserializeResponse,
|
|
344
|
+
this.logger,
|
|
345
|
+
this.performanceClient,
|
|
346
|
+
this.correlationId
|
|
347
|
+
)(
|
|
348
|
+
responseString,
|
|
349
|
+
this.config.auth.OIDCOptions.serverResponseType,
|
|
350
|
+
this.logger
|
|
351
|
+
);
|
|
333
352
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
353
|
+
return await invokeAsync(
|
|
354
|
+
Authorize.handleResponseCode,
|
|
355
|
+
PerformanceEvents.HandleResponseCode,
|
|
356
|
+
this.logger,
|
|
357
|
+
this.performanceClient,
|
|
358
|
+
correlationId
|
|
359
|
+
)(
|
|
360
|
+
request,
|
|
361
|
+
serverParams,
|
|
362
|
+
pkce.verifier,
|
|
363
|
+
ApiId.acquireTokenPopup,
|
|
364
|
+
this.config,
|
|
365
|
+
authClient,
|
|
366
|
+
this.browserStorage,
|
|
367
|
+
this.nativeStorage,
|
|
368
|
+
this.eventHandler,
|
|
369
|
+
this.logger,
|
|
370
|
+
this.performanceClient,
|
|
371
|
+
this.platformAuthProvider
|
|
372
|
+
);
|
|
373
|
+
}
|
|
354
374
|
} catch (e) {
|
|
355
375
|
// Close the synchronous popup if an error is thrown before the window unload event is registered
|
|
356
376
|
popupParams.popup?.close();
|
|
@@ -452,6 +472,84 @@ export class PopupClient extends StandardInteractionClient {
|
|
|
452
472
|
);
|
|
453
473
|
}
|
|
454
474
|
|
|
475
|
+
async executeCodeFlowWithPost(
|
|
476
|
+
request: CommonAuthorizationUrlRequest,
|
|
477
|
+
popupParams: PopupParams,
|
|
478
|
+
authClient: AuthorizationCodeClient,
|
|
479
|
+
pkceVerifier: string
|
|
480
|
+
): Promise<AuthenticationResult> {
|
|
481
|
+
const correlationId = request.correlationId;
|
|
482
|
+
// Get the frame handle for the silent request
|
|
483
|
+
const discoveredAuthority = await invokeAsync(
|
|
484
|
+
this.getDiscoveredAuthority.bind(this),
|
|
485
|
+
PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
|
|
486
|
+
this.logger,
|
|
487
|
+
this.performanceClient,
|
|
488
|
+
correlationId
|
|
489
|
+
)({
|
|
490
|
+
requestAuthority: request.authority,
|
|
491
|
+
requestAzureCloudOptions: request.azureCloudOptions,
|
|
492
|
+
requestExtraQueryParameters: request.extraQueryParameters,
|
|
493
|
+
account: request.account,
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
const popupWindow =
|
|
497
|
+
popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
498
|
+
|
|
499
|
+
const form = await Authorize.getCodeForm(
|
|
500
|
+
popupWindow.document,
|
|
501
|
+
this.config,
|
|
502
|
+
discoveredAuthority,
|
|
503
|
+
request,
|
|
504
|
+
this.logger,
|
|
505
|
+
this.performanceClient
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
form.submit();
|
|
509
|
+
|
|
510
|
+
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
511
|
+
const responseString = await invokeAsync(
|
|
512
|
+
this.monitorPopupForHash.bind(this),
|
|
513
|
+
PerformanceEvents.SilentHandlerMonitorIframeForHash,
|
|
514
|
+
this.logger,
|
|
515
|
+
this.performanceClient,
|
|
516
|
+
correlationId
|
|
517
|
+
)(popupWindow, popupParams.popupWindowParent);
|
|
518
|
+
|
|
519
|
+
const serverParams = invoke(
|
|
520
|
+
ResponseHandler.deserializeResponse,
|
|
521
|
+
PerformanceEvents.DeserializeResponse,
|
|
522
|
+
this.logger,
|
|
523
|
+
this.performanceClient,
|
|
524
|
+
this.correlationId
|
|
525
|
+
)(
|
|
526
|
+
responseString,
|
|
527
|
+
this.config.auth.OIDCOptions.serverResponseType,
|
|
528
|
+
this.logger
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
return invokeAsync(
|
|
532
|
+
Authorize.handleResponseCode,
|
|
533
|
+
PerformanceEvents.HandleResponseCode,
|
|
534
|
+
this.logger,
|
|
535
|
+
this.performanceClient,
|
|
536
|
+
correlationId
|
|
537
|
+
)(
|
|
538
|
+
request,
|
|
539
|
+
serverParams,
|
|
540
|
+
pkceVerifier,
|
|
541
|
+
ApiId.acquireTokenPopup,
|
|
542
|
+
this.config,
|
|
543
|
+
authClient,
|
|
544
|
+
this.browserStorage,
|
|
545
|
+
this.nativeStorage,
|
|
546
|
+
this.eventHandler,
|
|
547
|
+
this.logger,
|
|
548
|
+
this.performanceClient,
|
|
549
|
+
this.platformAuthProvider
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
|
|
455
553
|
/**
|
|
456
554
|
*
|
|
457
555
|
* @param validRequest
|