2019-12-23 14:35:39 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
namespace Umbraco.Cms.Core.Configuration
|
2019-12-23 14:35:39 +01:00
|
|
|
|
{
|
|
|
|
|
|
public abstract class PasswordConfiguration : IPasswordConfiguration
|
|
|
|
|
|
{
|
2020-03-12 14:36:25 +01:00
|
|
|
|
protected PasswordConfiguration(IPasswordConfiguration configSettings)
|
2019-12-23 14:35:39 +01:00
|
|
|
|
{
|
2020-03-12 14:36:25 +01:00
|
|
|
|
if (configSettings == null)
|
2019-12-23 14:35:39 +01:00
|
|
|
|
{
|
2020-03-12 14:36:25 +01:00
|
|
|
|
throw new ArgumentNullException(nameof(configSettings));
|
2019-12-23 14:35:39 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-03-12 14:36:25 +01:00
|
|
|
|
RequiredLength = configSettings.RequiredLength;
|
|
|
|
|
|
RequireNonLetterOrDigit = configSettings.RequireNonLetterOrDigit;
|
|
|
|
|
|
RequireDigit = configSettings.RequireDigit;
|
|
|
|
|
|
RequireLowercase = configSettings.RequireLowercase;
|
|
|
|
|
|
RequireUppercase = configSettings.RequireUppercase;
|
|
|
|
|
|
HashAlgorithmType = configSettings.HashAlgorithmType;
|
|
|
|
|
|
MaxFailedAccessAttemptsBeforeLockout = configSettings.MaxFailedAccessAttemptsBeforeLockout;
|
2019-12-23 14:35:39 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int RequiredLength { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool RequireNonLetterOrDigit { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool RequireDigit { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool RequireLowercase { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool RequireUppercase { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public string HashAlgorithmType { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public int MaxFailedAccessAttemptsBeforeLockout { get; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|