@labkey/api
    Preparing search index...

    Interface EnsureLoginOptions

    interface EnsureLoginOptions {
        failure?: RequestFailure<any>;
        force?: boolean;
        scope?: any;
        success?: RequestSuccess<{ currentUser: User }>;
        useSiteLoginPage?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    failure?: RequestFailure<any>

    This will be called upon failure to complete a request.

    force?: boolean

    Set to true to force a login even if the user is already logged in. This is useful for keeping a session alive during a long-lived page. To do so, call this function with force set to true, and useSiteLoginPage to false (or omit).

    scope?: any

    A scoping object for the success and failure callback functions (default to this).

    success?: RequestSuccess<{ currentUser: User }>

    This will be called upon successfully completing a request.

    useSiteLoginPage?: boolean

    Set to true to redirect the browser to the normal site login page. After the user logs in, the browser will be redirected back to the current page, and the current user information will be available via LABKEY.Security.currentUser. If omitted or set to false, this function will attempt to login via an AJAX request, which will cause the browser to display the basic authentication dialog. After the user logs in successfully, the success function will be called.