BgEngine.Security.Services.CodeFirstSecurity.IsAccountLockedOutInternal C# (CSharp) Method

IsAccountLockedOutInternal() private static method

private static IsAccountLockedOutInternal ( CodeFirstExtendedProvider provider, string userName, int allowedPasswordAttempts, System.TimeSpan interval ) : bool
provider BgEngine.Infraestructure.Security.CodeFirstExtendedProvider
userName string
allowedPasswordAttempts int
interval System.TimeSpan
return bool
        private static bool IsAccountLockedOutInternal(CodeFirstExtendedProvider provider, string userName, int allowedPasswordAttempts, TimeSpan interval)
        {
            return (provider.GetUser(userName, false) != null && provider.GetPasswordFailuresSinceLastSuccess(userName) > allowedPasswordAttempts && provider.GetLastPasswordFailureDate(userName).Add(interval) > DateTime.UtcNow);
        }