CodeLiturgy.Dashboard/CodeLiturgy.Views/Application/Session/LoginRequest.cs

40 lines
929 B
C#

using System.ComponentModel.DataAnnotations;
namespace CodeLiturgy.Data.Auth.Context.Users
{
// from: https://github.com/dotnet/aspnetcore/tree/main/src/Identity/samples/IdentitySample.Mvc/Models/AccountViewModels
/// <summary>
/// Login Request adata
/// </summary>
public class LoginRequest
{
/// <summary>
/// Email
/// </summary>
[Required]
[EmailAddress]
public string Email { get; set; }
/// <summary>
/// Password
/// </summary>
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
[Required]
public string Uuid { get ; set; }
/// <summary>
/// Gets Uuid for this login request
/// </summary>
/// <returns></returns>
public string GetUuid()
{
return $"{Uuid}|{Email}";
}
}
}