Esempio n. 1
0
        public async Task<IdentityResult> ResetUserPassword(PasswordResetConfirmation userModel)
        {
            var user = await _userManager.FindByEmailAsync(userModel.UserName);
            var result = await _userManager.ResetPasswordAsync(user.Id, userModel.ResetToken, userModel.NewPassword);

            return result;
        }
        public async Task<IHttpActionResult> ResetPassword(PasswordResetConfirmation passwordResetConfirmation)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            var result = await _authRepository.ResetUserPassword(passwordResetConfirmation);
            var errorResult = GetErrorResult(result);
            if (errorResult != null)
            {
                return errorResult;
            }
            return Ok();
        }
 public Task<IdentityResult> ResetUserPassword(PasswordResetConfirmation userModel)
 {
     return Task.FromResult(new IdentityResult());
 }