UNPKG

@amirmarmul/waba-common

Version:

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

21 lines (20 loc) 490 B
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;