UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

13 lines (12 loc) 585 B
import type { AbstractServiceOptions, PrimaryKey } from '@directus/types'; import type { Knex } from 'knex'; import { ItemsService } from './items.js'; export declare class TFAService { knex: Knex; itemsService: ItemsService; constructor(options: AbstractServiceOptions); verifyOTP(key: PrimaryKey, otp: string, secret?: string): Promise<boolean>; generateTFA(key: PrimaryKey, requiresPassword?: boolean): Promise<Record<string, string>>; enableTFA(key: PrimaryKey, otp: string, secret: string): Promise<void>; disableTFA(key: PrimaryKey): Promise<void>; }