Search Results for

    Show / Hide Table of Contents

    Class LoginController

    The controller for logging into the LemonEdge platform that manipulates the ILoginWindow window.

    Inheritance
    object
    LoginController
    Implements
    IController
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Authentication
    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
    Type Name Description
    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

    Fields

    _autoUpdaterChecker

    Declaration
    protected readonly IAutoUpdaterChecker _autoUpdaterChecker
    Field Value
    Type Description
    IAutoUpdaterChecker

    _owningWindow

    Declaration
    protected readonly ILoginWindow _owningWindow
    Field Value
    Type Description
    ILoginWindow

    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
    Type Description
    IEnumerable<ConnectionType>

    ModelController

    Declaration
    public IModelController ModelController { get; }
    Property Value
    Type Description
    IModelController

    OwningWindow

    The owning login window (ILoginWindow) this controller operates against

    Declaration
    public IWindow OwningWindow { get; }
    Property Value
    Type Description
    IWindow

    Methods

    CheckForServiceUpdates(LoginSettings)

    Declaration
    public Task CheckForServiceUpdates(LoginSettings settings)
    Parameters
    Type Name Description
    LoginSettings settings
    Returns
    Type Description
    Task

    CheckForUpdate(LoginSettings, Version)

    Declaration
    protected virtual Task CheckForUpdate(LoginSettings settings, Version requestedVersion = null)
    Parameters
    Type Name Description
    LoginSettings settings
    Version requestedVersion
    Returns
    Type Description
    Task

    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
    Type Name Description
    ConnectionType type
    string serviceUri
    Returns
    Type Description
    Task<ILoginProvider[]>

    InformUserIfNoSettingsConfig()

    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
    public void OpenHelp()

    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
    Type Name Description
    LoginSettings settings
    Version version
    Version assemblyVersion
    Returns
    Type Description
    Task<bool>

    Implements

    IController

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.