Package io.jmix.security.impl
Class BruteForceProtectionImpl
java.lang.Object
io.jmix.security.impl.BruteForceProtectionImpl
- All Implemented Interfaces:
- BruteForceProtection
@Component("sec_BruteForceProtection")
public class BruteForceProtectionImpl
extends Object
implements BruteForceProtection
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidinit()booleanReturns a number of login attempts left for the specified pair of login and IP-address.booleanvoidregisterLoginFailed(String username, String ipAddress) Registers unsuccessful login attempt.voidregisterLoginSucceeded(String username, String ipAddress) Registers successful login attempt.
- 
Constructor Details- 
BruteForceProtectionImplpublic BruteForceProtectionImpl()
 
- 
- 
Method Details- 
init@PostConstruct protected void init()
- 
isBlockedDescription copied from interface:BruteForceProtectionReturns a number of login attempts left for the specified pair of login and IP-address.- Specified by:
- isBlockedin interface- BruteForceProtection
- Parameters:
- username- username.
- ipAddress- user IP-address.
- Returns:
- true if count of login attempts left.
 
- 
registerLoginFailedDescription copied from interface:BruteForceProtectionRegisters unsuccessful login attempt.- Specified by:
- registerLoginFailedin interface- BruteForceProtection
 
- 
registerLoginSucceededDescription copied from interface:BruteForceProtectionRegisters successful login attempt. Clear attempts count for user.- Specified by:
- registerLoginSucceededin interface- BruteForceProtection
- Parameters:
- username- username.
- ipAddress- user IP-address.
 
- 
isProtectionEnabledpublic boolean isProtectionEnabled()- Specified by:
- isProtectionEnabledin interface- BruteForceProtection
- Returns:
- true if brute-force protection is enabled in application settings.
 
 
-