pCon.basket - Plugin Development
    Preparing search index...

    Interface AuthenticationPlugin

    Authentication interface used to identify the user. Provides the login and logout lifecycle.

    • Plugin category = Authentication
    interface AuthenticationPlugin {
        isAvailable?: boolean;
        logoutSupported: boolean;
        name: string;
        user: User | null;
        userSettingsStorage?: UserSettingsStorage;
        finalizeLogin?(): Promise<void>;
        initialize(
            pDescriptor: PluginDescriptor,
            pSettings: unknown,
        ): Promise<void>;
        login(): Promise<void>;
        logout(): Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    isAvailable?: boolean

    Optional, if false this plugin will not be used.

    logoutSupported: boolean

    If true the user may logout from the application.

    name: string
    user: User | null

    The currently logged in user.

    userSettingsStorage?: UserSettingsStorage

    Optional settings storage which is used to store the user settings.

    • Will be called after a successful login and after the user settings were loaded. Can be used to perform additional tasks which rely on the user settings. Note: If this step fails user shoulb be reset to null.

      Returns Promise<void>

    • Will be called once after the plugin was loaded.

      Parameters

      • pDescriptor: PluginDescriptor

        Plugin descriptor for this plugin.

      • pSettings: unknown

        Optional plugin specific settings which may be defined as part of the application settings.

      Returns Promise<void>

    • Perfom user authentication. user should be available afterwards if login was successful.

      Returns Promise<void>

    • logout the current user

      Returns Promise<void>