Class ConnectionLogHome
- java.lang.Object
-
- fr.paris.lutece.plugins.mylutece.authentication.logs.ConnectionLogHome
-
public final class ConnectionLogHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for UserLog objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddUserLog(ConnectionLog connetionLog, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table of connectionsstatic intgetLoginErrors(ConnectionLog connetionLog, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin)Calculate the number of connections with a given ip_address by a determinate timestatic voidresetConnectionLogs(java.lang.String strIp, java.sql.Timestamp dateLogin, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update connection logs of an IP to allow the user to login.
-
-
-
Method Detail
-
addUserLog
public static void addUserLog(ConnectionLog connetionLog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table of connections- Parameters:
connetionLog- the ConnectionLog objectplugin- The plugin
-
getLoginErrors
public static int getLoginErrors(ConnectionLog connetionLog, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Calculate the number of connections with a given ip_address by a determinate time- Parameters:
connetionLog- the connetionLog objectnIntervalMinutes- The number of minutes of properties fileplugin- The plugin- Returns:
- int the count of errors of login
-
resetConnectionLogs
public static void resetConnectionLogs(java.lang.String strIp, java.sql.Timestamp dateLogin, int nIntervalMinutes, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update connection logs of an IP to allow the user to login.- Parameters:
strIp- Ip to cleandateLogin- Date of the last login. Anly logs between this date plus or minus the minute interval will be cleared.nIntervalMinutes- Minutes intervalplugin- The plugin
-
-