Пример #1
0
        public async Task<ActionResult> EditPassword(PasswordViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View();
            }

            var authProxy = new AuthenticationProxy(WebConfigurationManager.AppSettings["WebApiUrl"], "user");

            await authProxy.UpdatePassword(viewModel.Id, viewModel.NewPassword, "bearer", Request.Cookies["token"].Value);

            return RedirectToAction("Index");
        }
Пример #2
0
        public async Task <ActionResult> EditPassword(PasswordViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            var authProxy = new AuthenticationProxy(WebConfigurationManager.AppSettings["WebApiUrl"], "user");

            await authProxy.UpdatePassword(viewModel.Id, viewModel.NewPassword, "bearer", Request.Cookies["token"].Value);

            return(RedirectToAction("Index"));
        }