Setup basic code for login.
This commit is contained in:
parent
a2e6d03d5b
commit
2b521924d0
15 changed files with 381 additions and 6 deletions
8
API/DTOs/LoginDto.cs
Normal file
8
API/DTOs/LoginDto.cs
Normal 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
13
API/DTOs/RegisterDto.cs
Normal 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
8
API/DTOs/UserDto.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace API.DTOs
|
||||
{
|
||||
public class UserDto
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Token { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue