Add controller for login

This commit is contained in:
2025-04-20 18:51:13 +02:00
parent 9696d53114
commit bcb641d430
8 changed files with 71 additions and 21 deletions

View File

@@ -9,6 +9,8 @@ public class GlobalConstants
public readonly static string ADMINISTRATOR = "Administrateur";
public readonly static string MEMBER = "Membre";
public readonly static int JWT_DURATION_HOUR = 12;
public readonly static int NUMBER_PER_PAGE = 50;
}

View File

@@ -1,11 +0,0 @@
using GameIdeas.Shared.Enum;
namespace GameIdeas.Shared.Dto;
public class LoginDto
{
public int? Id { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
public Role? Role { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace GameIdeas.Shared.Dto;
public class TokenDto
{
public string? Token { get; set; }
public DateTime? Expiration { get; set; }
}

View File

@@ -7,5 +7,5 @@ public class UserDto
public int? Id { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
public Role? Role { get; set; }
public string? RoleId { get; set; }
}

View File

@@ -1,8 +0,0 @@
namespace GameIdeas.Shared.Enum;
public enum Role
{
Guest = 1,
Member = 2,
Administrator = 3
}