Separated app into three layers, cleaned up leftovers

This commit is contained in:
Richárd Kunkli
2020-10-24 23:23:22 +02:00
parent 96003c21dd
commit 52667d913d
20 changed files with 237 additions and 106 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; }
}
}

View File

@ -0,0 +1,19 @@
using Birdmap.DAL.Entities;
using Newtonsoft.Json;
namespace Birdmap.API.DTOs
{
public class AuthenticateResponse
{
[JsonProperty("user_name")]
public string Username { get; set; }
[JsonProperty("user_role")]
public Roles UserRole { get; set; }
[JsonProperty("access_token")]
public string AccessToken { get; set; }
[JsonProperty("token_type")]
public string TokenType { get; set; }
[JsonProperty("expires_in")]
public double ExpiresIn { get; set; }
}
}