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