Make the default lockout time configurable for users and members (#13808)

* Make the default lock timeout configurable for users and members

* Update obsoletion to V13
This commit is contained in:
Kenn Jacobsen
2023-02-10 10:56:55 +01:00
committed by GitHub
parent 45f8ffcd0b
commit e529818560
3 changed files with 32 additions and 5 deletions

View File

@@ -22,6 +22,9 @@ public class SecuritySettings
internal const string StaticAllowedUserNameCharacters =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+\\";
internal const int StaticMemberDefaultLockoutTimeInMinutes = 30 * 24 * 60;
internal const int StaticUserDefaultLockoutTimeInMinutes = 30 * 24 * 60;
/// <summary>
/// Gets or sets a value indicating whether to keep the user logged in.
/// </summary>
@@ -86,6 +89,18 @@ public class SecuritySettings
[DefaultValue(StaticUserBypassTwoFactorForExternalLogins)]
public bool UserBypassTwoFactorForExternalLogins { get; set; } = StaticUserBypassTwoFactorForExternalLogins;
/// <summary>
/// Gets or sets a value for how long (in minutes) a member is locked out when a lockout occurs.
/// </summary>
[DefaultValue(StaticMemberDefaultLockoutTimeInMinutes)]
public int MemberDefaultLockoutTimeInMinutes { get; set; } = StaticMemberDefaultLockoutTimeInMinutes;
/// <summary>
/// Gets or sets a value for how long (in minutes) a user is locked out when a lockout occurs.
/// </summary>
[DefaultValue(StaticUserDefaultLockoutTimeInMinutes)]
public int UserDefaultLockoutTimeInMinutes { get; set; } = StaticUserDefaultLockoutTimeInMinutes;
/// <summary>
/// Gets or sets a value indicating whether to allow editing invariant properties from a non-default language variation.
/// </summary>