public string GetToken() { string t = _loginRepo.GetToken().Result; return(t); //throw new NotImplementedException(); }
public IActionResult Login(User user) { bool value = _userRepo.CheckUser(user); if (value == true) { string token = _loginRepo.GetToken().Result; var t = token; if (t != "") { HttpContext.Session.Clear(); HttpContext.Session.SetString("uid", user.Name); HttpContext.Session.SetString("token", t); return(RedirectToAction("AuditType", "Home")); } } ViewBag.ErrorMessage = "• Invalid Username Or Password"; return(View()); }