// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNetCore.Identity { /// /// Options for configuring user lockout. /// public class LockoutOptions { /// /// True if a newly created user can be locked out, otherwise false. /// /// /// Defaults to true. /// public bool AllowedForNewUsers { get; set; } = true; /// /// Gets or sets the number of failed access attempts allowed before a user is locked out, /// assuming lock out is enabled. /// /// /// The number of failed access attempts allowed before a user is locked out, if lockout is enabled. /// /// Defaults to 5 failed attempts before an account is locked out. public int MaxFailedAccessAttempts { get; set; } = 5; /// /// Gets or sets the a user is locked out for when a lockout occurs. /// /// The a user is locked out for when a lockout occurs. /// Defaults to 5 minutes. public TimeSpan DefaultLockoutTimeSpan { get; set; } = TimeSpan.FromMinutes(5); } }