changes
This commit is contained in:
12
Webshop.Application/DTOs/Auth/AuthResponseDto.cs
Normal file
12
Webshop.Application/DTOs/Auth/AuthResponseDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class AuthResponseDto
|
||||
{
|
||||
public bool IsAuthSuccessful { get; set; }
|
||||
public string ErrorMessage { get; set; } = string.Empty;
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
14
Webshop.Application/DTOs/Auth/LoginRequestDto.cs
Normal file
14
Webshop.Application/DTOs/Auth/LoginRequestDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class LoginRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "E-Mail ist erforderlich.")]
|
||||
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
22
Webshop.Application/DTOs/Auth/RegisterRequestDto.cs
Normal file
22
Webshop.Application/DTOs/Auth/RegisterRequestDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class RegisterRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "E-Mail ist erforderlich.")]
|
||||
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
||||
[MinLength(6, ErrorMessage = "Passwort muss mindestens 6 Zeichen lang sein.")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwortbestätigung ist erforderlich.")]
|
||||
[Compare("Password", ErrorMessage = "Passwörter stimmen nicht überein.")]
|
||||
public string ConfirmPassword { get; set; } = string.Empty;
|
||||
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user