import type { Hash } from '@adonisjs/core/hash'; import { type MongoModel } from './model/main.js'; import type { NormalizeConstructor } from '@adonisjs/core/types/helpers'; type UserWithUserFinderRow = { verifyPassword(plainPassword: string): Promise; }; type UserWithUserFinderClass = NormalizeConstructor> = Model & { hashPassword(this: T, user: InstanceType): Promise; findForAuth(this: T, uids: string[], value: string): Promise | null>; verifyCredentials(this: T, uid: string, password: string): Promise>; new (...args: any[]): UserWithUserFinderRow; }; /** * Mixing to add user lookup and password verification methods * on a model. * * Under the hood, this mixin defines following methods and hooks * * - beforeSave hook to hash user password * - findForAuth method to find a user during authentication * - verifyCredentials method to verify user credentials and prevent * timing attacks. */ export declare function withAuthFinder(hash: () => Hash, options: { uids: string[]; passwordColumnName: string; }): >(superclass: Model) => UserWithUserFinderClass; export {};