UNPKG

@directus/api

Version:

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

14 lines (13 loc) 598 B
import type { PrimaryKey } from '@directus/types'; import type { Knex } from 'knex'; import type { AbstractServiceOptions } from '../types/index.js'; 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): Promise<Record<string, string>>; enableTFA(key: PrimaryKey, otp: string, secret: string): Promise<void>; disableTFA(key: PrimaryKey): Promise<void>; }