// Copyright (c) Umbraco. // See LICENSE for more details. using System.ComponentModel; namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for user password settings. /// [UmbracoOptions(Constants.Configuration.ConfigUserPassword)] public class UserPasswordConfigurationSettings : IPasswordConfiguration { internal const int StaticRequiredLength = 10; internal const bool StaticRequireNonLetterOrDigit = false; internal const bool StaticRequireDigit = false; internal const bool StaticRequireLowercase = false; internal const bool StaticRequireUppercase = false; internal const int StaticMaxFailedAccessAttemptsBeforeLockout = 5; /// [DefaultValue(StaticRequiredLength)] public int RequiredLength { get; set; } = StaticRequiredLength; /// [DefaultValue(StaticRequireNonLetterOrDigit)] public bool RequireNonLetterOrDigit { get; set; } = StaticRequireNonLetterOrDigit; /// [DefaultValue(StaticRequireDigit)] public bool RequireDigit { get; set; } = StaticRequireDigit; /// [DefaultValue(StaticRequireLowercase)] public bool RequireLowercase { get; set; } = StaticRequireLowercase; /// [DefaultValue(StaticRequireUppercase)] public bool RequireUppercase { get; set; } = StaticRequireUppercase; /// [DefaultValue(Constants.Security.AspNetCoreV3PasswordHashAlgorithmName)] public string HashAlgorithmType { get; set; } = Constants.Security.AspNetCoreV3PasswordHashAlgorithmName; /// [DefaultValue(StaticMaxFailedAccessAttemptsBeforeLockout)] public int MaxFailedAccessAttemptsBeforeLockout { get; set; } = StaticMaxFailedAccessAttemptsBeforeLockout; } }