59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using e_suite.API.Common.models;
|
|
|
|
namespace eSuite.API.Models;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public interface IPasswordInformation
|
|
{
|
|
/// <summary>
|
|
/// new password
|
|
/// </summary>
|
|
[Display(Name = "New Password")]
|
|
[DataType(DataType.Password)]
|
|
public string? Password { get; set; }
|
|
|
|
/// <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; }
|
|
|
|
/// <summary>
|
|
/// Using Two factor authentication
|
|
/// </summary>
|
|
[Display(Name = "Using two factor authentication")]
|
|
[Required]
|
|
public bool UsingTwoFactorAuthentication { get; set; }
|
|
|
|
/// <summary>
|
|
/// Two factor authentication support settings - QR Code and manual token
|
|
/// </summary>
|
|
public TwoFactorAuthenticationSettings TwoFactorAuthenticationSettings { get; set; }
|
|
|
|
/// <summary>
|
|
/// security code generated by authenticator application
|
|
/// </summary>
|
|
[Display(Name = "Authentication code")]
|
|
public string? SecurityCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// Sso login overridden by this being set
|
|
/// </summary>
|
|
public long? DomainSsoProviderId { get; set; }
|
|
|
|
/// <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; }
|
|
|
|
/// <summary>
|
|
/// List of SSO Providers that the user can select.
|
|
/// </summary>
|
|
public Dictionary<long, string> SsoProviders { get; set; }
|
|
} |