Class LoginAttemptRepository
- Namespace
- KadicAuth.Infrastructure.Repositories
- Assembly
- KadicAuth.Infrastructure.dll
public class LoginAttemptRepository : ILoginAttemptRepository
- Inheritance
-
object
LoginAttemptRepository
- Implements
-
Constructors
LoginAttemptRepository(AuthDbContext)
public LoginAttemptRepository(AuthDbContext context)
Parameters
context AuthDbContext
Methods
AddAsync(LoginAttempt, CancellationToken)
public Task AddAsync(LoginAttempt loginAttempt, CancellationToken cancellationToken = default)
Parameters
loginAttempt LoginAttempt
cancellationToken CancellationToken
Returns
- Task
GetFailedAttemptsCountAsync(string, int, CancellationToken)
public Task<int> GetFailedAttemptsCountAsync(string email, int minutes, CancellationToken cancellationToken = default)
Parameters
email string
minutes int
cancellationToken CancellationToken
Returns
- Task<int>
GetRecentFailedAttemptsByEmailAsync(string, int, CancellationToken)
public Task<List<LoginAttempt>> GetRecentFailedAttemptsByEmailAsync(string email, int minutes, CancellationToken cancellationToken = default)
Parameters
email string
minutes int
cancellationToken CancellationToken
Returns
- Task<List<LoginAttempt>>
GetRecentFailedAttemptsByIpAsync(string, int, CancellationToken)
public Task<List<LoginAttempt>> GetRecentFailedAttemptsByIpAsync(string ipAddress, int minutes, CancellationToken cancellationToken = default)
Parameters
ipAddress string
minutes int
cancellationToken CancellationToken
Returns
- Task<List<LoginAttempt>>