public interface BruteForceProtectionAPI
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
int |
getBruteForceBlockIntervalSec()
Returns a time interval for which a user is blocked after the number
of allowed login attempts is exceeded
|
java.util.Set<java.lang.String> |
getLockedUsersInfo()
Returns an information about the locked users
|
boolean |
isBruteForceProtectionEnabled() |
int |
loginAttemptsLeft(java.lang.String login,
java.lang.String ipAddress)
Returns a number of login attempts left for the specified pair of login and IP-address
|
int |
registerUnsuccessfulLogin(java.lang.String login,
java.lang.String ipAddress)
Registers unsuccessful login attempt
|
void |
unlockUser(java.lang.String login,
java.lang.String ipAddress)
Unlocks the blocked user
|
static final java.lang.String NAME
int loginAttemptsLeft(java.lang.String login, java.lang.String ipAddress)
login
- user loginipAddress
- user IP-addressint registerUnsuccessfulLogin(java.lang.String login, java.lang.String ipAddress)
boolean isBruteForceProtectionEnabled()
int getBruteForceBlockIntervalSec()
java.util.Set<java.lang.String> getLockedUsersInfo()
void unlockUser(java.lang.String login, java.lang.String ipAddress)
login
- user loginipAddress
- user IP-address