コード例 #1
0
        public IActionResult HashPassword(HashPasswordViewModel model)
        {
            if (!signinManager.AuthSettings.EnablePasswordHasherUi)
            {
                log.LogInformation("returning 404 because EnablePasswordHasherUi is false");
                Response.StatusCode = 404;
                return new EmptyResult();
            }

            if (model.InputPassword.Length > 0)
            {
                var fakeUser = new SimpleAuthUser();
                model.OutputHash = signinManager.HashPassword(model.InputPassword);
            }

            return View(model);
        }
コード例 #2
0
        public IActionResult HashPassword()
        {
            if (!signinManager.AuthSettings.EnablePasswordHasherUi)
            {
                log.LogInformation("returning 404 because EnablePasswordHasherUi is false");
                Response.StatusCode = 404;
                return new EmptyResult();
            }

            var model = new HashPasswordViewModel();

            return View(model);
        }