Fixed API folder name

This commit is contained in:
Richárd Kunkli
2020-10-25 16:56:44 +01:00
parent c837f592d0
commit 853f05d63c
50 changed files with 1 additions and 1 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; }
}
}

View File

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Birdmap.API.DTOs
{
public class RegisterRequest
{
[Required(AllowEmptyStrings = false, ErrorMessage = "Username is required.")]
public string Username { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Password is required."), DataType(DataType.Password)]
public string Password { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Please confirm password.")]
[DataType(DataType.Password), Compare(nameof(Password), ErrorMessage = "Passwords did not match.")]
public string ConfirmPassword { get; set; }
}
}