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

40 lines
926 B
C#

using System.ComponentModel.DataAnnotations;
namespace BlueWest.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}";
}
}
}