UNPKG

781 BTypeScriptView Raw
1import { HookContext } from '@feathersjs/feathers';
2import hashPassword from './hooks/hash-password';
3import { LocalStrategy } from './strategy';
4export declare const hooks: {
5 hashPassword: typeof hashPassword;
6 protect: (...fields: string[]) => (context: HookContext, next?: import("@feathersjs/feathers").NextFunction) => Promise<void>;
7};
8export { LocalStrategy };
9/**
10 * Returns as property resolver that hashes a given plain text password using a Local
11 * authentication strategy.
12 *
13 * @param options The authentication `service` and `strategy` name
14 * @returns
15 */
16export declare const passwordHash: (options: {
17 service?: string;
18 strategy: string;
19}) => <H extends HookContext<any, any>>(value: string | undefined, _data: any, context: H) => Promise<string>;