Package com.io7m.idstore.server.service.ratelimit

# Class IdRateLimitEmailVerificationService

java.lang.Object
com.io7m.idstore.server.service.ratelimit.IdRateLimitEmailVerificationService

All Implemented Interfaces:
  `IdRateLimitEmailVerificationServiceType`, `com.io7m.repetoir.core.RPServiceType`

public final class IdRateLimitEmailVerificationService extends Object implements IdRateLimitEmailVerificationServiceType
A rate limiting service for email verifications.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IdRateLimitEmailVerificationServiceType`
  `create(IdServerTelemetryServiceType telemetry, long expiration, TimeUnit timeUnit)`
  A rate limiting service for email verifications.
  `String`
  `description()`
  `boolean`
  `isAllowedByRateLimit(UUID user)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### create

    public static IdRateLimitEmailVerificationServiceType create(IdServerTelemetryServiceType 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)
    Specified by:
      `isAllowedByRateLimit` in interface `IdRateLimitEmailVerificationServiceType`
    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 `com.io7m.repetoir.core.RPServiceType`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`