Backend/e-suite.API/eSuite.API/Models/ConfirmEmailAccount.cs
2026-01-20 21:50:10 +00:00

59 lines
1.9 KiB
C#

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