public ActionResult Login(WorkerLogin workerLogin) { _workerService.Login(workerLogin); var actionType = workerLogin.WithoutFilters ? ActionType.IndexWithoutFilters : ActionType.Index; return(RedirectToAction(actionType.ToString(), EntityType.Reservation.ToString())); }
public ActionResult ExternalLogin(string gafete) { var workerLogin = new WorkerLogin { Badge = gafete }; _workerService.Login(workerLogin); return(RedirectToAction(ActionType.Index.ToString(), EntityType.Reservation.ToString())); }
public async Task <IActionResult> SignIn(WorkerLogin worker) { var res = await _signManager.PasswordSignInAsync(worker.Login, worker.Password, true, false); if (res.Succeeded) { return(Ok()); } return(BadRequest("Login or password invalid")); }