Package com.mastfrog.acteur.auth
Interface Tarpit
public interface Tarpit
Used by AuthenticateBasicActeur. Too many failed password attempts and you go
in the tar pit - first responses are delayed, then blocked altogether.
Callers are identified by default by their IP address, but you can inject a
TarpitCacheKeyFactory to look at cookies or whatever you want.
- Author:
- Tim Boudreau
-
Field Summary
Fields -
Method Summary
-
Field Details
-
SETTINGS_KEY_TARPIT_EXPIRATION_TIME_MINUTES
- See Also:
-
DEFAULT_TARPIT_EXPIRATION_TIME_MINUTES
static final int DEFAULT_TARPIT_EXPIRATION_TIME_MINUTES- See Also:
-
-
Method Details
-
add
Add an entry to the tarpit for failing to authenticate, incrementing the count if necessary.- Parameters:
evt- The http request- Returns:
- The updated number of bad requests
-
count
Get the number of bad requests- Parameters:
evt- An http request- Returns:
- The
-
remove
-