public FailedLoginAttemptsService( IFailedLoginAttemptsRepository repository, IOptions <FailedLoginAttemptsSettings> failedAttemptsSettings ) { _maxRequestsCount = failedAttemptsSettings.Value.MaxRequestsCount; _timeIntervalInSeconds = failedAttemptsSettings.Value.TimeIntervalInSeconds; _repository = repository; }
public AntiBruteForceAuthenticator( IAuthenticationService wrappedAuthenticationService, IFailedLoginAttemptsRepository failedLoginAttemptsRepository) { _wrappedAuthenticationService = wrappedAuthenticationService ?? throw new ArgumentNullException(nameof(wrappedAuthenticationService)); _failedLoginAttemptsRepository = failedLoginAttemptsRepository ?? throw new ArgumentNullException(nameof(failedLoginAttemptsRepository)); }