Class LoginLogService
- Namespace
- Dynamicweb.Security.UserManagement
- Assembly
- Dynamicweb.Core.dll
Records and reads authentication events in the login audit log. Writes are best-effort: a logging failure never propagates to the caller.
public class LoginLogService
- Inheritance
-
LoginLogService
- Inherited Members
Methods
DeleteOlderThan(DateTime)
Deletes login log entries older than the given threshold.
public virtual void DeleteOlderThan(DateTime threshold)
Parameters
thresholdDateTimeEntries with a timestamp strictly before this are deleted.
GetEntries(LoginLogFilter)
Reads login log entries matching the given filter, most recent first.
public virtual IEnumerable<LoginLogEntry> GetEntries(LoginLogFilter filter)
Parameters
filterLoginLogFilterThe filter to apply.
Returns
GetEntryCount(LoginLogFilter)
Gets the total number of login log entries matching the given filter, ignoring paging.
public virtual int GetEntryCount(LoginLogFilter filter)
Parameters
filterLoginLogFilterThe filter to apply.
Returns
Log(LoginLogEntry)
Records an authentication event. Does nothing if login logging is disabled, and never throws — failures are swallowed and logged to the system log.
public virtual void Log(LoginLogEntry entry)
Parameters
entryLoginLogEntryThe event to record.