Skip to content

Task/262/user password change ability/ implement backend#284

Merged
Vasia1101 merged 9 commits into
devfrom
task/262/User-password-change-ability/-Implement-backend
Jun 18, 2026
Merged

Task/262/user password change ability/ implement backend#284
Vasia1101 merged 9 commits into
devfrom
task/262/User-password-change-ability/-Implement-backend

Conversation

@InnetaSh

Copy link
Copy Markdown
Contributor

dev

JIRA

Code reviewers

  • @github_username

Second Level Review

  • @github_username

Summary of issue

Users currently lack a backend implementation for password updates, preventing the front-end interface from successfully processing password change requests.

Summary of change

Implemented the backend logic for secure password modification.

DTO: Created ChangePasswordDto for transporting current and new passwords.

MediatR: Added ChangePasswordCommand and ChangePasswordHandler to handle the password update process.

Validation: Implemented ChangePasswordCommandValidator using FluentValidation with robust rules (password strength, confirmation matching, etc.).

Controller: Exposed a new endpoint in the UsersController to receive password change requests.

Logic: Integrated UserManager.ChangePasswordAsync to ensure secure password hashing and identity management.

Testing approach

Unit Testing:

Created ChangePasswordCommandValidatorTests to verify validation rules (password length, mismatch confirmation, etc.).

Created ChangePasswordHandlerTests using Moq to verify successful password update flow and error handling (user not found, incorrect password).

Manual/Integration Verification:

Verified that the endpoint correctly processes valid requests and returns appropriate errors for invalid current password or validation failures.

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

@InnetaSh InnetaSh self-assigned this Jun 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Vasia1101 Vasia1101 merged commit 61ff84a into dev Jun 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants