@amirmarmul/waba-common
Version:

21 lines (20 loc) • 490 B
TypeScript
import Authenticable from './Authenticable';
export interface Guard {
/**
* Determine if the current user is authenticated.
*/
check(): Promise<boolean>;
/**
* Determine if the current user is a guest.
*/
guest(): Promise<boolean>;
/**
* Set the current user.
*/
setUser(user: Authenticable): Promise<void>;
/**
* Get the currently authenticated user.
*/
user(): Promise<Authenticable | null>;
}
export default Guard;