public OperationResult<bool> Login(LoginViewModel loginViewModel, IAuthenticationManager authentication) { var identity = this.loginService.GetUserIndentity(loginViewModel); var userIdentity = identity.Result; authentication.SignIn(new AuthenticationProperties { IsPersistent = loginViewModel.RememberMe }, userIdentity); return new OperationResult<bool>(true); }
public ActionResult Index(LoginViewModel loginViewModel) { var authentication = this.HttpContext.GetOwinContext().Authentication; var result = this.loginLogic.Login(loginViewModel, authentication); if (result.Success) { return this.RedirectToAction("Index", "Concepts"); } return null; }
public static LoginViewModel CreateValid() { var result = new LoginViewModel { Password = "******", RememberMe = false, UserName = "******" }; return result; }
public OperationResult<LoginViewModel> GetLoginViewModel() { var data = new LoginViewModel(); var result = new OperationResult<LoginViewModel>(data); return result; }