BrockAllen.MembershipReboot.Mvc.Areas.UserAccount.Controllers.PasswordResetController.Confirm C# (CSharp) Метод

Confirm() приватный Метод

private Confirm ( BrockAllen.MembershipReboot.Mvc.Areas.UserAccount.Models.ChangePasswordFromResetKeyInputModel model ) : System.Web.Mvc.ActionResult
model BrockAllen.MembershipReboot.Mvc.Areas.UserAccount.Models.ChangePasswordFromResetKeyInputModel
Результат System.Web.Mvc.ActionResult
        public ActionResult Confirm(ChangePasswordFromResetKeyInputModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    BrockAllen.MembershipReboot.UserAccount account;
                    if (this.userAccountService.ChangePasswordFromResetKey(model.Key, model.Password, out account))
                    {
                        AuthenticationFailureCode failureCode;
                        this.userAccountService.Authenticate(this.userAccountService.Configuration.DefaultTenant,
                            account.Username, model.Password, out account, out failureCode);
                        if (failureCode == AuthenticationFailureCode.None)
                        {
                            this.authenticationService.SignIn(account);
                            if (account.RequiresTwoFactorAuthCodeToSignIn())
                            {
                                return RedirectToAction("TwoFactorAuthCodeLogin", "Login");
                            }
                            if (account.RequiresTwoFactorCertificateToSignIn())
                            {
                                return RedirectToAction("CertificateLogin", "Login");
                            }
                        }

                        return RedirectToAction("Success");
                    }
                    else
                    {
                        ModelState.AddModelError("", "Error changing password. The key might be invalid.");
                    }
                }
                catch (ValidationException ex)
                {
                    ModelState.AddModelError("", ex.Message);
                }
            }
            return View();
        }

Same methods

PasswordResetController::Confirm ( string id ) : System.Web.Mvc.ActionResult