Files
image-platform/apps/backend/src/auth/dto/login.dto.ts

21 lines
788 B
TypeScript
Raw Normal View History

import { ApiProperty } from "@nestjs/swagger"
export class LoginRequestDto {
@ApiProperty({ description: "Логин администратора.", example: "admin" })
username!: string
@ApiProperty({ description: "Пароль администратора.", example: "admin" })
password!: string
}
export class LoginResponseDto {
@ApiProperty({ description: "Bearer token сессии администратора.", example: "admin.eyJ1c2VybmFtZSI6ImFkbWluIn0.signature" })
accessToken!: string
@ApiProperty({ description: "Тип токена для HTTP Authorization header.", example: "Bearer" })
tokenType!: "Bearer"
@ApiProperty({ description: "ISO-дата истечения сессии.", example: "2026-05-13T10:00:00.000Z" })
expiresAt!: string
}