Package io.jmix.security
Interface BruteForceProtection
- All Known Implementing Classes:
BruteForceProtectionImpl
public interface BruteForceProtection
Class is responsible for the brute-force protection on user authentication.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns a number of login attempts left for the specified pair of login and IP-address.boolean
void
registerLoginFailed
(String username, String ipAddress) Registers unsuccessful login attempt.void
registerLoginSucceeded
(String username, String ipAddress) Registers successful login attempt.
-
Method Details
-
isBlocked
Returns a number of login attempts left for the specified pair of login and IP-address.- Parameters:
username
- username.ipAddress
- user IP-address.- Returns:
- true if count of login attempts left.
-
registerLoginFailed
Registers unsuccessful login attempt. -
isProtectionEnabled
boolean isProtectionEnabled()- Returns:
- true if brute-force protection is enabled in application settings.
-
registerLoginSucceeded
Registers successful login attempt. Clear attempts count for user.- Parameters:
username
- username.ipAddress
- user IP-address.
-