- Add DTOs: RegisterDto, LoginDto, AuthResponse - Add IAuthService interface - Implement AuthService with JWT token generation - Create AuthController with register, login, me endpoints - Add JWT configuration to appsettings.json - Configure JWT Bearer authentication in Program.cs - Add PasswordHasher for custom User entity - Update User entity with ChangePassword method - Add necessary NuGet packages for JWT auth Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
16 lines
333 B
C#
16 lines
333 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace GermanApp.Application.DTOs.Auth;
|
|
|
|
/// <summary>
|
|
/// DTO for user login.
|
|
/// </summary>
|
|
public record LoginDto
|
|
{
|
|
[Required]
|
|
[EmailAddress]
|
|
public string Email { get; init; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Password { get; init; } = string.Empty;
|
|
}
|