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();
        }
Esempio 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());
        }