public ActionResult Login(LogInModel model, string returnUrl)
        {
            //ZAPFuzzer
            var user = MvcApplication.DataStore.Users.FirstOrDefault(t => t.UserName == model.UserName);

            if (user != null && Crypto.VerifyHashedPassword( user.HashedPassword, model.Password))
            {
                // using forms authentication,
                // simply because most people will be more familiar
                FormsAuthentication.SetAuthCookie(model.UserName, false);
                return Redirect(returnUrl ?? "/");
            }
            return View();
        }
Exemplo n.º 2
0
        public ActionResult Login(LogInModel model, string returnUrl)
        {
            //ZAPFuzzer
            var user = MvcApplication.DataStore.Users.FirstOrDefault(t => t.UserName == model.UserName);

            if (user != null && Crypto.VerifyHashedPassword(user.HashedPassword, model.Password))
            {
                // using forms authentication,
                // simply because most people will be more familiar
                FormsAuthentication.SetAuthCookie(model.UserName, false);
                return(Redirect(returnUrl ?? "/"));
            }
            return(View());
        }