Class IdRateLimitEmailVerificationService

java.lang.Object
com.io7m.idstore.server.internal.IdRateLimitEmailVerificationService
All Implemented Interfaces:
IdServiceType

public final class IdRateLimitEmailVerificationService extends Object implements IdServiceType
A rate limiting service for email verifications.
  • Method Details

    • create

      public static IdRateLimitEmailVerificationService create(IdServerTelemetryService telemetry, long expiration, TimeUnit timeUnit)
      A rate limiting service for email verifications.
      Parameters:
      telemetry - The telemetry service
      expiration - The expiration for tokens
      timeUnit - The time unit for expirations
      Returns:
      A rate limiter
    • isAllowedByRateLimit

      public boolean isAllowedByRateLimit(UUID user)
      Parameters:
      user - The user ID
      Returns:
      true if the given operation is allowed by rate limiting
    • description

      public String description()
      Specified by:
      description in interface IdServiceType
      Returns:
      The service description
    • toString

      public String toString()
      Overrides:
      toString in class Object