Class AuthenticationThrottler
java.lang.Object
org.apache.syncope.core.spring.security.throttle.AuthenticationThrottler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javax.cache.Cache<String, ThrottlerAttempts> static final Stringprotected final LongSupplierprotected final SecurityProperties.ThrottleProperties -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationThrottler(SecurityProperties securityProperties, javax.cache.Cache<String, ThrottlerAttempts> attempts) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAllowed(String domain, String username) voidclearFailures(String domain, String username) protected booleanprotected static StringvoidrecordFailure(String domain, String username) protected static longretryAfterSeconds(long blockedUntil, long now)
-
Field Details
-
CACHE
- See Also:
-
throttle
-
clock
-
attempts
-
-
Constructor Details
-
AuthenticationThrottler
public AuthenticationThrottler(SecurityProperties securityProperties, javax.cache.Cache<String, ThrottlerAttempts> attempts)
-
-
Method Details
-
key
-
retryAfterSeconds
protected static long retryAfterSeconds(long blockedUntil, long now) -
checkAllowed
-
clearFailures
-
recordFailure
-
isEnabled
protected boolean isEnabled() -
prune
-