Plugins
The SonarLogin Plugin System is designed to allow third party developers integrate their functionality into the SonarLogin execution flow. It provides a flexible design exposing the main events and actions of the system, so that developers get notified of such events to execute their own workflows, controlling and/or changing the default behaviour of the system. Developers can design their own functionality to inject in the system through the plugins. The plugin is simply a compiled Dynamic Link Library (
Interface of a SonarLogin plugin
The interface that must be implemented is the CopSonic.SonarLogin.Plugin.ISonarLoginPlugin public interface in the SonarLoginPlugin assembly. This interface contains a public property field named SonarLoginHostApp(of type CopSonic.SonarLogin.Plugin.ISonarLoginHostApp) that represents the SonarLogin system, which allows the interaction with the system. This interface provides the following methods and events, which can be used by developers to redesign the behaviour of the system:
/// <summary>
/// Invoked when the user logs in.
/// </summary>
event EventHandler UserLoggedIn;
/// <summary>
/// Invoked when the user logs out.
/// </summary>
event EventHandler UserLoggedOut;
/// <summary>
/// Invoked when the SonarLogin Lock Screen App blocks the session due to a timeout
/// in the process of receiving the proximity verification from the paired mobile device.
/// </summary>
event EventHandler SessionLocked;
/// <summary>
/// Invoked when the SonarLogin Lock Screen App is automatically closed due to the
/// user mobile device approaching the PC and resuming the continuous authentication process.
/// </summary>
event EventHandler SessionUnlocked;
/// <summary>
/// Sends a command to activate the SonarLogin Lock Screen App to block the session.
/// </summary>
void LockSession();
/// <summary>
/// Sends a command to deactivate the SonarLogin Lock Screen App to unblock the session.
/// </summary>
void UnlockSession();
/// <summary>
/// Indicates whether the session is locked.
/// </summary>
bool IsSessionLocked { get; }
/// <summary>
/// Pauses the continuous authentication process. The process will be resumed whenever
/// the session is manually locked/logged out and then unlocked/logged in, or in case
/// the <see cref="ResumeContinuousAuthentication"/> method is called.
/// </summary>
void PauseContinuousAuthentication();
/// <summary>
/// Resumes the continuous authentication process.
/// </summary>
void ResumeContinuousAuthentication();
/// <summary>
/// Indicates whether the continuous authentication process is currently running.
/// </summary>
bool IsContinuousAuthenticationRunning { get; }
/// <summary>
/// Provides the <see cref="DateTime"/> indicating the last moment when the
/// user's paired mobile device participating in the continuous authentication process
/// was detected by the SonarLogin system in the PC.
/// </summary>
DateTime DeviceLastSeen { get; }
Loading a plugin
The SonarLogin Plugin System provides a visual control in the Manager App in the Settings window for the users to load the desired plugins with just one click. A window will appear to allow the user to search the PC to select the plugin as a Dynamic Link Library (
Notice
Only a privileged user (running the Manager App with administrative rigths) can load a plugin.