namespace DotBased.ASP.Auth; public class BasedAuthConfiguration { /// /// Allow users to registrate. /// public bool AllowRegistration { get; set; } //TODO: Callback when a user registers, so the application can handle sending emails or generate a code to complete the registration. //TODO: Callback for validation email, phone number /// /// Allow no passwords on users, not recommended! /// public bool AllowEmptyPassword { get; set; } = false; /// /// This path is used for redirecting to the login page. /// public string LoginPath { get; set; } = string.Empty; /// /// The path that will be used if the logout is requested. /// public string LogoutPath { get; set; } = string.Empty; /// /// The max age before a AuthenticationState will expire (default: 7 days). /// public TimeSpan AuthenticationStateMaxAgeBeforeExpire { get; set; } = TimeSpan.FromDays(7); /// /// Can be used to seed a default user and/or group for first time use. /// public Action? SeedData { get; set; } public Type? AuthDataProviderType { get; private set; } public void SetDataProviderType() where TDataProviderType : IAuthDataProvider => AuthDataProviderType = typeof(TDataProviderType); public Type? SessionStateProviderType { get; private set; } public void SetSessionStateProviderType() where TSessionStateProviderType : ISessionStateProvider => SessionStateProviderType = typeof(TSessionStateProviderType); }