public async Task <IActionResult> AuthenticatePassword([FromBody] AuthenticatePasswordInputModel model)
        {
            if (ModelState.IsValid)
            {
                var response = await _authenticateOrchestrator.AuthenticatePasswordAsync(model);

                if (response.StatusCode == 301)
                {
                    return(await SignInAndReturnAsync(model.Username, model.StaySignedIn, response.RedirectUrl));
                }
                return(response.ToJsonResult());
            }
            return(new ActionResponse(ModelState).ToJsonResult());
        }
        public async Task <IActionResult> AuthenticatePassword([FromBody] AuthenticatePasswordInputModel model)
        {
            if (ModelState.IsValid)
            {
                var status = await _authenticateOrchestrator.AuthenticatePasswordAsync(model);

                if (status.StatusCode == HttpStatusCode.Redirect)
                {
                    return(NextUrlJsonResult(status.RedirectUrl));
                }
                return(status.ToJsonResult());
            }
            return(new ActionResponse(ModelState).ToJsonResult());
        }