Пример #1
0
        public async Task <ActionResult> ValidateLogin(string patientId, DateTime dateOfBirth)
        {
            var requestDispatcher = CreateAsyncRequestDispatcher();

            requestDispatcher.Add(new ValidatePatientAccountRequest {
                SystemAccountKey = UserContext.Current.SystemAccountKey.Value, PatientIdentifier = patientId, DateOfBirth = dateOfBirth
            });
            var response = await requestDispatcher.GetAsync <ValidatePatientAccountResponse> ();

            if (response.IsLocked)
            {
                var signoutMessage = _logoutService.Logout();
                return(Redirect(signoutMessage.WriteQueryString()));
            }
            if (response.Validated)
            {
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("validation-error", "Invalid information.");
            return(View());
        }
Пример #2
0
        public ActionResult Logout()
        {
            var signoutMessage = _logoutService.Logout();

            return(Redirect(signoutMessage.WriteQueryString()));
        }
Пример #3
0
        public async Task <IActionResult> Logout()
        {
            await _logoutService.Logout();

            return(Ok());
        }