CodeLiturgy.Dashboard/BlueWest.Api/Users/Models/LoginRequest.cs

40 lines
922 B
C#
Raw Normal View History

2022-09-10 00:33:17 +03:00
using System.ComponentModel.DataAnnotations;
namespace BlueWest.WebApi.Context.Users
{
// from: https://github.com/dotnet/aspnetcore/tree/main/src/Identity/samples/IdentitySample.Mvc/Models/AccountViewModels
/// <summary>
2022-09-17 22:13:35 +03:00
/// Login Request adata
2022-09-10 00:33:17 +03:00
/// </summary>
2022-09-17 22:13:35 +03:00
public class LoginRequest
2022-09-10 00:33:17 +03:00
{
/// <summary>
/// Email
/// </summary>
[Required]
[EmailAddress]
public string Email { get; set; }
/// <summary>
/// Password
/// </summary>
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
2022-09-17 22:13:35 +03:00
[Required]
public string Uuid { get; set; }
2022-09-10 00:33:17 +03:00
2022-09-18 04:00:24 +03:00
/// <summary>
/// Gets Uuid for this login request
/// </summary>
/// <returns></returns>
public string GetUuid()
{
return $"{Uuid}|{Email}";
}
2022-09-10 00:33:17 +03:00
}
}