Files
pos-system/services/iam-service-net/src/IamService.API/Application/Commands/Auth/AdminResetPasswordCommand.cs
Ho Ngoc Hai b537cea290 feat(iam): add admin reset password endpoint for staff management
- Create AdminResetPasswordCommand + Handler using Identity's
  GeneratePasswordResetTokenAsync + ResetPasswordAsync (no current
  password required, admin-only action)
- Add POST /api/v1/users/{id}/reset-password endpoint in UsersController
  with OwnerOrAdmin authorization policy
- Fix BFF staff/reset-password to send correct payload

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:32:39 +07:00

12 lines
402 B
C#

using MediatR;
namespace IamService.API.Application.Commands.Auth;
/// <summary>
/// EN: Admin command to force-reset a user's password (no current password required).
/// VI: Command admin để reset mật khẩu user (không cần mật khẩu hiện tại).
/// </summary>
public record AdminResetPasswordCommand(
Guid UserId,
string NewPassword) : IRequest<ChangePasswordCommandResult>;