Task/262/user password change ability/ implement backend#284
Merged
Vasia1101 merged 9 commits intoJun 18, 2026
Conversation
…d' of https://github.com/project-studying-dotnet/Streetcode-Server-May2026 into task/262/User-password-change-ability/-Implement-backend
Vasia1101
approved these changes
Jun 18, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



dev
JIRA
Code reviewers
Second Level Review
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