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.1KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Teknik.Configuration
  7. {
  8. public class UserConfig
  9. {
  10. public bool RegistrationEnabled { get; set; }
  11. public bool LoginEnabled { get; set; }
  12. public bool PasswordResetEnabled { get; set; }
  13. public string UsernameFilter { get; set; }
  14. public string UsernameFilterLabel { get; set; }
  15. public int MinUsernameLength { get; set; }
  16. public int MaxUsernameLength { get; set; }
  17. public string ReservedUsernameDefinitionFile { 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. ReservedUsernameDefinitionFile = string.Empty;
  28. }
  29. }
  30. }