Practic Passkey - v1.0.0
    Preparing search index...

    Type Alias AdminDependencies

    What the admin actions need from the server: the stores, the settings, and how sessions are read and ended.

    type AdminDependencies = {
        config: StorageEngine;
        data: StorageEngine;
        endSessions: (
            where: { address: string } | { credentialId: string },
        ) => Promise<number>;
        hasAdminKey: (context: PasskeyContext) => Promise<boolean>;
        isAdmin?: (
            account: PasskeyAccount,
            app: string,
        ) => boolean | Promise<boolean>;
        resolveSession: (
            app: string,
            context: PasskeyContext,
            reply: Reply,
        ) => Promise<{ owner: PasskeyAccount } | undefined>;
        root: StorageEngine;
        settings: () => Promise<PasskeySettings>;
    }
    Index

    The app's config store.

    The app's data store.

    endSessions: (
        where: { address: string } | { credentialId: string },
    ) => Promise<number>

    Ends the sessions matching the fields given, answering how many.

    hasAdminKey: (context: PasskeyContext) => Promise<boolean>

    Whether the request carries one of the server's admin keys.

    isAdmin?: (account: PasskeyAccount, app: string) => boolean | Promise<boolean>

    Whether a signed-in account administers an app, decided by the host, such as from its own roles; the app's admins setting decides when not given.

    resolveSession: (
        app: string,
        context: PasskeyContext,
        reply: Reply,
    ) => Promise<{ owner: PasskeyAccount } | undefined>

    The request's live session and its account.

    The root store, where the apps are kept.

    settings: () => Promise<PasskeySettings>

    The app's settings, defaults filled in.