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()); }
public ActionResult Logout() { var signoutMessage = _logoutService.Logout(); return(Redirect(signoutMessage.WriteQueryString())); }
public async Task <IActionResult> Logout() { await _logoutService.Logout(); return(Ok()); }