Table of Contents

Interface ILoginAttemptRepository

Namespace
KadicAuth.Application.Auth.Abstractions
Assembly
KadicAuth.Application.dll
public interface ILoginAttemptRepository

Methods

AddAsync(LoginAttempt, CancellationToken)

Task AddAsync(LoginAttempt loginAttempt, CancellationToken cancellationToken = default)

Parameters

loginAttempt LoginAttempt
cancellationToken CancellationToken

Returns

Task

GetFailedAttemptsCountAsync(string, int, CancellationToken)

Task<int> GetFailedAttemptsCountAsync(string email, int minutes, CancellationToken cancellationToken = default)

Parameters

email string
minutes int
cancellationToken CancellationToken

Returns

Task<int>

GetRecentFailedAttemptsByEmailAsync(string, int, CancellationToken)

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)

Task<List<LoginAttempt>> GetRecentFailedAttemptsByIpAsync(string ipAddress, int minutes, CancellationToken cancellationToken = default)

Parameters

ipAddress string
minutes int
cancellationToken CancellationToken

Returns

Task<List<LoginAttempt>>