The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserConfig.cs 1.5KB

123456789101112131415161718192021222324252627282930313233343536
  1. namespace Teknik.Configuration
  2. {
  3. public class UserConfig
  4. {
  5. public bool RegistrationEnabled { get; set; }
  6. public bool LoginEnabled { get; set; }
  7. public bool PasswordResetEnabled { get; set; }
  8. public string UsernameFilter { get; set; }
  9. public string UsernameFilterLabel { get; set; }
  10. public int MinUsernameLength { get; set; }
  11. public int MaxUsernameLength { get; set; }
  12. public int MinPasswordLength { get; set; }
  13. public string ReservedUsernameDefinitionFile { get; set; }
  14. public decimal PremiumAccountPrice { get; set; }
  15. public string PaymentType { get; set; }
  16. public bool InviteCodeRequired { get; set; }
  17. public IdentityServerConfig IdentityServerConfig { get; set; }
  18. public UserConfig()
  19. {
  20. RegistrationEnabled = true;
  21. LoginEnabled = true;
  22. PasswordResetEnabled = true;
  23. UsernameFilter = "^[a-zA-Z0-9_-]+(?:\\.[a-zA-Z0-9_-]+)*$";
  24. UsernameFilterLabel = "AlphaNumeric Characters with Dashes, Underlines, and 0-1 Periods not in the beginning or end.";
  25. MinUsernameLength = 1;
  26. MaxUsernameLength = 35;
  27. MinPasswordLength = 2;
  28. ReservedUsernameDefinitionFile = string.Empty;
  29. PremiumAccountPrice = 0;
  30. PaymentType = "Donation";
  31. InviteCodeRequired = false;
  32. IdentityServerConfig = new IdentityServerConfig();
  33. }
  34. }
  35. }