AdminGetUserAuthHistoryDTO
Package: @nauth-toolkit/core
Type: DTO (Request)
Context: Admin Only
Request DTO for getting paginated authentication history for any user (admin operation) with optional filtering by event types, status, and date ranges.
Admin Only
This DTO requires the sub field to specify the target user. It extends GetUserAuthHistoryDTO and adds the sub field. For user self-service operations, use GetUserAuthHistoryDTO instead.
- NestJS
- Express
- Fastify
import { AdminGetUserAuthHistoryDTO } from '@nauth-toolkit/nestjs';
import { AdminGetUserAuthHistoryDTO } from '@nauth-toolkit/core';
import { AdminGetUserAuthHistoryDTO } from '@nauth-toolkit/core';
Properties
This DTO extends GetUserAuthHistoryDTO and adds the following required field:
| Property | Type | Required | Description |
|---|---|---|---|
sub | string | Yes | User's unique identifier (UUID v4). Trimmed and lowercased. |
page | number | No | Page number (1-indexed). Default: 1 |
limit | number | No | Number of records per page. Default: 50. Max: 500. |
startDate | Date | No | Filter events from this date onwards |
endDate | Date | No | Filter events up to this date |
eventTypes | AuthAuditEventType[] | No | Filter by specific event types |
eventStatus | AuthAuditEventStatus[] | No | Filter by event status. Allowed: SUCCESS, FAILURE, INFO, SUSPICIOUS. |
Example
{
"sub": "550e8400-e29b-41d4-a716-446655440000",
"page": 1,
"limit": 50,
"eventTypes": ["LOGIN_SUCCESS", "LOGIN_FAILED"],
"startDate": "2025-01-01T00:00:00.000Z"
}
Used By
- AdminAuthService - Admin operation
Related DTOs
- GetUserAuthHistoryDTO - User self-service version (no
subfield) - GetUserAuthHistoryResponseDTO - Response DTO
Related APIs
- AuthAuditEventType - Complete list of event types
- AuthAuditEventStatus - Event status values