Class LoginController
The controller for logging into the LemonEdge platform that manipulates the ILoginWindow window.
Inheritance
LoginController
Assembly: LemonEdge.ClientCore.dll
Syntax
public class LoginController : IController
Constructors
LoginController(ILoginWindow, IModelController, IConnectorFactory, IAddInLoaderHelper, IClientAuthenticationManager, IClientAuthenticationSettingsRepository, IOptions<ConnectionSettings>, IOptions<UpdaterSettings>, ILoginSettingsFactory, IAutoUpdaterChecker, IDatabaseStatusProxy, IApplicationContext, ILogger<LoginController>)
Creates a new instance of the login controller for the specified login window instance
Declaration
public LoginController(ILoginWindow window, IModelController modelController, IConnectorFactory connectorFactory, IAddInLoaderHelper addInLoaderHelper, IClientAuthenticationManager authenticationManager, IClientAuthenticationSettingsRepository authSettingsRepo, IOptions<ConnectionSettings> connectionSettings, IOptions<UpdaterSettings> updaterSettings, ILoginSettingsFactory loginSettingsFactory, IAutoUpdaterChecker autoUpdaterChecker, IDatabaseStatusProxy databaseStatusProxy, IApplicationContext applicationContext, ILogger<LoginController> logger)
Parameters
Fields
_autoUpdaterChecker
Declaration
protected readonly IAutoUpdaterChecker _autoUpdaterChecker
Field Value
_owningWindow
Declaration
protected readonly ILoginWindow _owningWindow
Field Value
Properties
GetValidConnectionTypes
Returns a list of all the valid connection types this application can login with. There are two current
connections; database and web service. Most applications allow both, but for instance the web app can only connect
via the web service.
Declaration
public IEnumerable<ConnectionType> GetValidConnectionTypes { get; }
Property Value
ModelController
Declaration
public IModelController ModelController { get; }
Property Value
OwningWindow
The owning login window (ILoginWindow) this controller operates against
Declaration
public IWindow OwningWindow { get; }
Property Value
Methods
CheckForServiceUpdates(LoginSettings)
Declaration
public Task CheckForServiceUpdates(LoginSettings settings)
Parameters
Returns
CheckForUpdate(LoginSettings, Version)
Declaration
protected virtual Task CheckForUpdate(LoginSettings settings, Version requestedVersion = null)
Parameters
Returns
GetDatabaseName(string)
For a given service uri will attempt to connect to the LemonEdge service and return a list of valid database aliases
that service has that we can connect to
Declaration
public Task<string> GetDatabaseName(string serviceUri)
Parameters
Type |
Name |
Description |
string |
serviceUri |
The uri of a valid LemonEdge web service
|
Returns
Type |
Description |
Task<string> |
A task holding a list of valid database aliases the specified web service has that we can connect to
|
GetLoginProviders(ConnectionType, string)
Declaration
public Task<ILoginProvider[]> GetLoginProviders(ConnectionType type, string serviceUri)
Parameters
Returns
Informs the user if there is no associated settings.config file with this running process
Declaration
public Task InformUserIfNoSettingsConfig()
Returns
Type |
Description |
Task |
A task indicating the completion of the operation
|
Login(LoginSettings)
Attempts to login to the LemonEdge platform using the specified login settings
If the login is successful this also stores those login settings locally for re-use next time (if the setting
includes RememberMe).
Declaration
public Task<bool> Login(LoginSettings settings)
Parameters
Type |
Name |
Description |
LoginSettings |
settings |
The settings to use to login to the LemonEdge platform
|
Returns
Type |
Description |
Task<bool> |
A task holding a flag indicating if the login was successful or not
|
OpenHelp()
Opens the LemonEdge help documentation for the login dialog window
Declaration
RefreshDisplay(bool)
First verifies if there is a later version of this application to download, and provides the user the option to do
so if there is
Otherwise refreshes the login window with the latest login settings
Declaration
public Task<bool> RefreshDisplay(bool promptIfSettingsMissing)
Parameters
Type |
Name |
Description |
bool |
promptIfSettingsMissing |
Prompts to the user if the settings.config file is not found/corrupt
|
Returns
Type |
Description |
Task<bool> |
A task indicating if the login window was refreshed. False if they downloaded a new version of the application
instead.
|
VersionMismatchCheck(LoginSettings, Version, Version)
Declaration
protected virtual Task<bool> VersionMismatchCheck(LoginSettings settings, Version version, Version assemblyVersion)
Parameters
Returns
Implements
Extension Methods