AdminSetPasswordDTO
Package: @nauth-toolkit/core
Type: DTO (Request/Response)
Data transfer objects for admin-initiated password reset by sub (UUID).
- NestJS
- Express
- Fastify
import { AdminSetPasswordDTO, AdminSetPasswordResponseDTO } from '@nauth-toolkit/nestjs';
import { AdminSetPasswordDTO, AdminSetPasswordResponseDTO } from '@nauth-toolkit/core';
import { AdminSetPasswordDTO, AdminSetPasswordResponseDTO } from '@nauth-toolkit/core';
AdminSetPasswordDTO (Request)
| Property | Type | Required | Description |
|---|---|---|---|
sub | string | Yes | User sub (UUID v4). Trimmed, lowercased for consistency. |
newPassword | string | Yes | New password. 8-128 characters. Not trimmed. |
mustChangePassword | boolean | No | Require password change on next login. Default: true (applied by service when not provided). |
revokeSessions | boolean | No | Revoke all active sessions. Default: true (applied by service when not provided). |
AdminSetPasswordResponseDTO (Response)
| Property | Type | Description |
|---|---|---|
success | boolean | Always true on success. |
mustChangePassword | boolean | Whether user must change password on next login. |
sessionsRevoked | number | Number of sessions revoked. |
Example
{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"newPassword": "NewSecurePassword123!",
"mustChangePassword": true,
"revokeSessions": true
}