import { DeepstreamPlugin, DeepstreamAuthentication, DeepstreamServices } from '@deepstream/types'; interface FileAuthConfig { users: any; hash: string | false; iterations: number; keyLength: number; reportInvalidParameters: boolean; } /** * This authentication handler reads a list of users and their associated password (either * hashed or in cleartext ) from a json file. This can be useful to authenticate smaller amounts * of clients with static credentials, e.g. backend provider that write to publicly readable records */ export declare class FileBasedAuthentication extends DeepstreamPlugin implements DeepstreamAuthentication { private settings; private services; description: string; private base64KeyLength; private hashSettings; /** * Creates the class, reads and validates the users.json file */ constructor(settings: FileAuthConfig, services: DeepstreamServices); whenReady(): Promise; /** * Main interface. Authenticates incoming connections */ isValidUser(connectionData: any, authData: any): Promise<{ isValid: boolean; clientData: { error: string; }; id?: undefined; serverData?: undefined; } | { isValid: boolean; id: any; serverData: any; clientData: any; } | { isValid: boolean; clientData?: undefined; id?: undefined; serverData?: undefined; } | null>; /** * Called initially to validate the user provided settings */ private validateSettings; } export {};