示例#1
0
        public ActionResult Index(LoginInput input)
        {
            if (!ModelState.IsValid)
            {
                return View(input);
            }

            if (authenticationService.SignIn(input.Username, input.Password))
            {
                formsAuthenticationGateway.RedirectFromLoginPage(input.Username, false);
            }

            ModelState.AddModelError("Login","Invalid Login");

            return View(input);
        }
示例#2
0
 public ActionResult Index(string username)
 {
     var model = new LoginInput();
     return View(model);
 }