Added AuthModule with services, controllers, and guards for authentication. Implements session management, role-based access control, 2FA, and DTOs for user login, registration, and token refresh.
15 lines
233 B
TypeScript
15 lines
233 B
TypeScript
import { IsEmail, IsNotEmpty, IsString, MinLength } from "class-validator";
|
|
|
|
export class RegisterDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
username!: string;
|
|
|
|
@IsEmail()
|
|
email!: string;
|
|
|
|
@IsString()
|
|
@MinLength(8)
|
|
password!: string;
|
|
}
|