using System; using System.Threading; using System.Threading.Tasks; namespace Microsoft.AspNet.Identity { /// /// Stores information which can be used to implement account lockout, including access failures and lockout status /// /// public interface IUserLockoutStore : IUserStore where TUser : class { /// /// Returns the DateTimeOffset that represents the end of a user's lockout, any time in the past should be considered /// not locked out. /// /// /// /// Task GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); /// /// Locks a user out until the specified end date (set to a past date, to unlock a user) /// /// /// /// /// Task SetLockoutEndDateAsync(TUser user, DateTimeOffset lockoutEnd, CancellationToken cancellationToken = default(CancellationToken)); /// /// Used to record when an attempt to access the user has failed /// /// /// /// Task IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); /// /// Used to reset the account access count, typically after the account is successfully accessed /// /// /// /// Task ResetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns the current number of failed access attempts. This number usually will be reset whenever the password is /// verified or the account is locked out. /// /// /// /// Task GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns whether the user can be locked out. /// /// /// /// Task GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); /// /// Sets whether the user can be locked out. /// /// /// /// /// Task SetLockoutEnabledAsync(TUser user, bool enabled, CancellationToken cancellationToken = default(CancellationToken)); } }