Setup basic code for login.

This commit is contained in:
Joseph Milazzo 2020-12-12 20:14:56 -06:00
parent a2e6d03d5b
commit 2b521924d0
15 changed files with 381 additions and 6 deletions

8
API/DTOs/LoginDto.cs Normal file
View file

@ -0,0 +1,8 @@
namespace API.DTOs
{
public class LoginDto
{
public string Username { get; set; }
public string Password { get; set; }
}
}

13
API/DTOs/RegisterDto.cs Normal file
View file

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace API.DTOs
{
public class RegisterDto
{
[Required]
public string Username { get; set; }
[Required]
[StringLength(8, MinimumLength = 4)]
public string Password { get; set; }
}
}

8
API/DTOs/UserDto.cs Normal file
View file

@ -0,0 +1,8 @@
namespace API.DTOs
{
public class UserDto
{
public string Username { get; set; }
public string Token { get; set; }
}
}