EmailIdpAuthenticationUtil constructor

EmailIdpAuthenticationUtil({
  1. required Argon2HashUtil hashUtil,
  2. required RateLimit failedLoginRateLimit,
})

Creates a new instance of EmailIdpAuthenticationUtil.

Implementation

EmailIdpAuthenticationUtil({
  required final Argon2HashUtil hashUtil,
  required final RateLimit failedLoginRateLimit,
}) : _hashUtil = hashUtil,
     _rateLimitUtil = DatabaseRateLimitedRequestAttemptUtil(
       RateLimitedRequestAttemptConfig(
         domain: 'email',
         source: 'failed_login',
         maxAttempts: failedLoginRateLimit.maxAttempts,
         timeframe: failedLoginRateLimit.timeframe,
       ),
     ),
     _maxAttempts = failedLoginRateLimit.maxAttempts;