Files
xIdentityModels/Configurations/XIdentityConfiguration.cs
2024-01-25 04:42:47 +03:30

83 lines
2.6 KiB
C#

using System.Collections.Generic;
using xIdentityModels.Dtos;
namespace xIdentityModels.Configurations {
public class XIdentityConfiguration {
//
// Define All Policies which can Apply to Identity Framework
// and also create a Default instance if it's not Exists
// in AppSetting JSON file ...
public XIdentityPolicy Policy { get; set; }
/// <summary>
/// the Security Key which used to Signing JWT Tokens
/// in Authentication Provider
/// </summary>
/// <value></value>
public string IdentitySecretKey { get; set; }
/// <summary>
/// the Issuer and Creator of Token
/// </summary>
/// <value></value>
public string IdentityIssuer { get; set; }
/// <summary>
/// the Audience and Consumer of Token
/// </summary>
/// <value></value>
public string IdentityAudience { get; set; }
/// <summary>
/// the List of Users Roles which must Provides in Identity
/// </summary>
/// <value></value>
public HashSet<string> IdentityRoles { get; set; }
/// <summary>
/// determines All new users must Assign to which role in Registration
/// </summary>
/// <value></value>
public string NewUsersRole { get; set; }
/// <summary>
/// determines New Registered Users Confirm Email or not
/// </summary>
/// <value></value>
public bool AutoConfirmNewUsersEmail { get; set; }
/// <summary>
/// determines New Registered Users Confirm PhoneNumber or not
/// </summary>
/// <value></value>
public bool AutoConfirmNewUsersPhoneNumber { get; set; }
/// <summary>
/// determines the Registration only Can be done with Invitation or not
/// </summary>
/// <value></value>
public bool RegistrationJustWithInvite { get; set; }
/// <summary>
/// determines the Registration required confirmation with email or not
/// </summary>
/// <value></value>
public bool RequireRegistrationConfirm { get; set; }
//
public int MaxNumberOfVerificationCodeSend { get; set; }
//
public int DeleyBetweenTwoVerificationCode { get; set; }
public int BannedDeviceTimeout { get; set; }
/// <summary>
/// an string Which Provide how long a action token can be valid
/// </summary>
/// <value></value>
public string ActionTokenExpirationDateProvider { get; set; }
public HashSet<XIdentityMessageDto> IdentityMessages { get; set; }
}
}