Added auth/authenticate endpoint
This commit is contained in:
13
Birdmap/Models/AuthenticateRequest.cs
Normal file
13
Birdmap/Models/AuthenticateRequest.cs
Normal 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
14
Birdmap/Models/User.cs
Normal 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; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user