Added auth/authenticate endpoint

This commit is contained in:
2020-10-21 17:04:54 +02:00
parent 33884cdd2f
commit 0fa2d3a579
10 changed files with 237 additions and 5 deletions

View File

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace Birdmap.Models
{
public class AuthenticateRequest
{
[Required(AllowEmptyStrings = false, ErrorMessage = "Username is required.")]
public string Username { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Password is required.")]
public string Password { get; set; }
}
}

14
Birdmap/Models/User.cs Normal file
View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Birdmap.Models
{
public class User
{
public string Name { get; set; }
public byte[] PasswordHash { get; set; }
public byte[] PasswordSalt { get; set; }
}
}