예제 #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());
        }