UNPKG

@amirmarmul/waba-common

Version:

![GitHub release](https://img.shields.io/github/v/release/amirmarmul/waba-common?style=flat-square)

17 lines (16 loc) 467 B
import Authenticable from './Authenticable'; export interface UserProvider { /** * Get user by their unique identifier. */ getById(id: any): Promise<Authenticable | null>; /** * Get user by their api token. */ getByToken(token: string): Promise<Authenticable | null>; /** * Get user by the given credentials. */ getByCredentials(credentials: object): Promise<Authenticable | null>; } export default UserProvider;