declare module "totpChecker" { export interface ToTpGeneratorOptions { digits?: number; period?: number; algorithm?: "SHA-1" | "SHA-256" | "SHA-512"; label?: string; secretLength?: number; issuer: string; } export interface ToTpSecretAndUrl { url: string; secret: string; } export class TotpChecker { static ValidateTotp(_totpSecret: string, _code: string): Promise; static EncodeBase32(input: Buffer): string; static GenerateCode(optionsOrIssuer: ToTpGeneratorOptions | string): ToTpSecretAndUrl; } } declare module "yesManAuthenticationHandler" { import { IAuthenticationHandler } from "index"; export class YesManAuthenticationHandler implements IAuthenticationHandler { private useTotp; constructor(useTotp: boolean); tryLogin(username: string, password: string, totp?: string): Promise; needTotp(username: string): Promise; } } declare module "sqliteAuthenticationHandler" { import { IAuthenticationHandler } from "index"; export interface AccountInformation { username: string; passwordEncoded: string; totpSecret: string | null; } export type GetAccountInformationFunction = ((username: string) => Promise); export type EncodePasswordFunction = ((password: string) => string); export class SqliteAuthenticationHandler implements IAuthenticationHandler { passwordEncoder: EncodePasswordFunction; getAccountInformation: GetAccountInformationFunction; constructor(getAccountInformationFunction: GetAccountInformationFunction, passwordEncoder: EncodePasswordFunction); needTotp(username: string): Promise; tryLogin(username: string, password: string, totp?: string): Promise; } } declare module "index" { export interface IAuthenticationHandler { tryLogin(username: string, password: string, totp?: string): Promise; needTotp(username: string): Promise; } export class AuthenticationLoader { private handlers; addAuthenticationHandler(authenticationHandler: IAuthenticationHandler): void; tryLogin(username: string, password: string, totpCode?: string): Promise; needTotp(username: string): Promise; } import { YesManAuthenticationHandler } from "yesManAuthenticationHandler"; export { YesManAuthenticationHandler }; import { TotpChecker, ToTpGeneratorOptions, ToTpSecretAndUrl } from "totpChecker"; export { TotpChecker, ToTpGeneratorOptions, ToTpSecretAndUrl }; import { AccountInformation, EncodePasswordFunction, GetAccountInformationFunction, SqliteAuthenticationHandler } from "sqliteAuthenticationHandler"; export { AccountInformation, EncodePasswordFunction, GetAccountInformationFunction, SqliteAuthenticationHandler }; } //# sourceMappingURL=index.d.ts.map