Class IdRateLimitPasswordResetService
java.lang.Object
com.io7m.idstore.server.service.ratelimit.IdRateLimitPasswordResetService
- All Implemented Interfaces:
IdRateLimitPasswordResetServiceType,IdServiceType
public final class IdRateLimitPasswordResetService
extends Object
implements IdRateLimitPasswordResetServiceType
A rate limiting service for password resets.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(IdServerTelemetryServiceType telemetry, long expiration, TimeUnit timeUnit) Create a rate limit service.booleanisAllowedByRateLimit(String host) toString()
-
Method Details
-
create
public static IdRateLimitPasswordResetServiceType create(IdServerTelemetryServiceType telemetry, long expiration, TimeUnit timeUnit) Create a rate limit service.- Parameters:
telemetry- The telemetry serviceexpiration- The expiration for tokenstimeUnit- The time unit for expirations- Returns:
- A rate limiter
-
isAllowedByRateLimit
- Specified by:
isAllowedByRateLimitin interfaceIdRateLimitPasswordResetServiceType- Parameters:
host- The host performing the action- Returns:
trueif the given operation is allowed by rate limiting
-
description
- Specified by:
descriptionin interfaceIdServiceType- Returns:
- The service description
-
toString
-