Separated app into three layers, cleaned up leftovers
This commit is contained in:
13
Birdmap/DTOs/AuthenticateRequest.cs
Normal file
13
Birdmap/DTOs/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; }
|
||||
}
|
||||
}
|
19
Birdmap/DTOs/AuthenticateResponse.cs
Normal file
19
Birdmap/DTOs/AuthenticateResponse.cs
Normal 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; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user