@cimo/authentication
Version:
Authentication middleware. Light, fast and secure.
14 lines (13 loc) • 429 B
TypeScript
export interface Irequest {
headers: Record<string, string | string[] | undefined>;
cookies: Record<string, string>;
user?: Record<string, unknown>;
body: {
user?: Record<string, unknown>;
};
}
export interface Iresponse {
status(code: number): Iresponse;
send(data: Record<string, unknown>): Iresponse;
cookie(name: string, value: string, options?: Record<string, unknown>): Iresponse;
}