Package com.logicaldoc.core.security
Class LoginThrottle
- java.lang.Object
- 
- com.logicaldoc.core.security.LoginThrottle
 
- 
 public class LoginThrottle extends Object Utility methods to prevent brute force attacks- Since:
- 7.6.3
- Author:
- Marco Meschieri - LogicalDOC
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringLOGINFAIL_IPstatic StringLOGINFAIL_USERNAME
 - 
Constructor SummaryConstructors Constructor Description LoginThrottle()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckLoginThrottle(String username, String ip)Performs anti brute force attack checksstatic voidclearFailures(String username, String ip)Clears the failures for the given username and or passwordstatic voidrecordFailure(String username, Client client)Saves the login failure in the database
 
- 
- 
- 
Field Detail- 
LOGINFAIL_IPpublic static final String LOGINFAIL_IP - See Also:
- Constant Field Values
 
 - 
LOGINFAIL_USERNAMEpublic static final String LOGINFAIL_USERNAME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
clearFailurespublic static void clearFailures(String username, String ip) Clears the failures for the given username and or password- Parameters:
- username- the username
- ip- the IP address from which the login intent comes from
 
 - 
recordFailurepublic static void recordFailure(String username, Client client) Saves the login failure in the database- Parameters:
- username- the username
- client- the client address from which the login intent comes from
 
 - 
checkLoginThrottlepublic static void checkLoginThrottle(String username, String ip) throws AuthenticationException Performs anti brute force attack checks- Parameters:
- username- the username
- ip- the IP address from which the login intent comes from
- Throws:
- AuthenticationException- if the authentication fails
 
 
- 
 
-