- 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>
12 lines
402 B
C#
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>;
|