using System.ComponentModel.DataAnnotations; using e_suite.API.Common.models; namespace eSuite.API.Models; /// /// User profile class used by the MVC User profile pages /// public class UserProfile : IPasswordInformation { /// /// First name /// [Display(Name = "First Name")] public string? FirstName { get; set; } = string.Empty; /// /// Middle names /// [Display(Name = "Middle Name(s)")] public string? MiddleNames { get; set; } = string.Empty; /// /// Last name /// [Display(Name = "Last Name")] public string? LastName { get; set; } = string.Empty; /// /// e-mail address /// [Required] [EmailAddress] [Display(Name = "E-Mail")] public string Email { get; set; } = string.Empty; /// /// new password /// [Display(Name = "New Password")] [DataType(DataType.Password)] public string? Password { get; set; } = string.Empty; /// /// new password entered again to ensure that the user hasn't made a mistake /// [Display(Name = "Confirm Password")] [DataType(DataType.Password)] [Compare(nameof(Password), ErrorMessage = "Passwords do not match")] public string? ConfirmPassword { get; set; } = string.Empty; /// /// Using Two factor authentication /// [Display(Name = "Using two factor authentication")] [Required] public bool UsingTwoFactorAuthentication { get; set; } = false; /// /// Two factor authentication support settings - QR Code and manual token /// public TwoFactorAuthenticationSettings TwoFactorAuthenticationSettings { get; set; } = null!; /// /// security code generated by authenticator application /// [Display(Name = "Authentication code")] public string? SecurityCode { get; set; } = null!; /// /// Sso login overridden by this being set /// public long? DomainSsoProviderId { get; set; } /// /// Sso login method. -1 = password and optional 2FA, anything else is from the SsoPrividers list. /// [Display(Name = "Login Method")] public long SsoProviderId { get; set; } = -1; /// /// SSO user Id /// public string SsoSubject { get; set; } = string.Empty; /// /// List of SSO Providers that the user can select. /// public Dictionary SsoProviders { get; set; } = []; }