Skip to main content

AdminRevokeSessionDTO

Package: @nauth-toolkit/core Type: DTO (Request/Response)

Data transfer objects for admin-initiated revocation of a specific user session.

import { AdminRevokeSessionDTO, LogoutSessionResponseDTO } from '@nauth-toolkit/nestjs';

AdminRevokeSessionDTO (Request)

PropertyTypeRequiredDescription
substringYesUser sub (UUID v4). Trimmed, lowercased for consistency.
sessionIdstringYesSession ID to revoke.

LogoutSessionResponseDTO (Response)

PropertyTypeDescription
successbooleanWhether the session was successfully revoked.
wasCurrentSessionbooleanWhether the revoked session was the current session.

Example

{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"sessionId": "session-uuid-123"
}

Used By