Class IdRateLimitAdminLoginService
java.lang.Object
com.io7m.idstore.server.service.ratelimit.IdRateLimitAdminLoginService
- All Implemented Interfaces:
IdRateLimitAdminLoginServiceType,com.io7m.repetoir.core.RPServiceType
public final class IdRateLimitAdminLoginService
extends Object
implements IdRateLimitAdminLoginServiceType
A rate limiting service for logins.
-
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 IdRateLimitAdminLoginServiceType 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 interfaceIdRateLimitAdminLoginServiceType- Parameters:
host- The host performing the action- Returns:
trueif the given operation is allowed by rate limiting
-
description
- Specified by:
descriptionin interfacecom.io7m.repetoir.core.RPServiceType
-
toString
-