Package org.jivesoftware.admin
Class LoginLimitManager
java.lang.Object
org.jivesoftware.admin.LoginLimitManager
Handles recording admin console login attempts and handling temporary lockouts where necessary.
- Author:
- Daniel Henninger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SystemProperty<Long>static final SystemProperty<Long>static final SystemProperty<Duration>static final SystemProperty<Duration> -
Method Summary
Modifier and TypeMethodDescriptionstatic LoginLimitManagerReturns a singleton instance of LoginLimitManager.booleanhasHitConnectionLimit(String username, String address) Returns true of the entered username or connecting IP address has hit it's attempt limit.voidrecordFailedAttempt(String username, String address) Records a failed connection attempt.voidrecordSuccessfulAttempt(String username, String address) Clears failed login attempts if a success occurs.
-
Field Details
-
MAX_ATTEMPTS_PER_IP
-
PER_IP_ATTEMPT_RESET_INTERVAL
-
MAX_ATTEMPTS_PER_USERNAME
-
PER_USERNAME_ATTEMPT_RESET_INTERVAL
-
-
Method Details
-
getInstance
Returns a singleton instance of LoginLimitManager.- Returns:
- a LoginLimitManager instance.
-
hasHitConnectionLimit
Returns true of the entered username or connecting IP address has hit it's attempt limit.- Parameters:
username- Username being checked.address- IP address that is connecting.- Returns:
- True if the login attempt limit has been hit.
-
recordFailedAttempt
Records a failed connection attempt.- Parameters:
username- Username being attempted.address- IP address that is attempting.
-
recordSuccessfulAttempt
Clears failed login attempts if a success occurs.- Parameters:
username- Username being attempted.address- IP address that is attempting.
-