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 Summary
Constructors - 
Method Summary
Modifier 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
- 
BruteForceProtectionImpl
public BruteForceProtectionImpl() 
 - 
 - 
Method Details
- 
init
@PostConstruct protected void init() - 
isBlocked
Description copied from interface:BruteForceProtectionReturns a number of login attempts left for the specified pair of login and IP-address.- Specified by:
 isBlockedin interfaceBruteForceProtection- Parameters:
 username- username.ipAddress- user IP-address.- Returns:
 - true if count of login attempts left.
 
 - 
registerLoginFailed
Description copied from interface:BruteForceProtectionRegisters unsuccessful login attempt.- Specified by:
 registerLoginFailedin interfaceBruteForceProtection
 - 
registerLoginSucceeded
Description copied from interface:BruteForceProtectionRegisters successful login attempt. Clear attempts count for user.- Specified by:
 registerLoginSucceededin interfaceBruteForceProtection- Parameters:
 username- username.ipAddress- user IP-address.
 - 
isProtectionEnabled
public boolean isProtectionEnabled()- Specified by:
 isProtectionEnabledin interfaceBruteForceProtection- Returns:
 - true if brute-force protection is enabled in application settings.
 
 
 -