UNPKG

insite-cookie

Version:

Cookie-based auth for inSite (client + server)

20 lines 791 B
import type { AbilitiesSchema } from "insite-common"; import type { UsersServer, WSSCWithUser } from "insite-users-server-ws"; import { parseCookie } from "./parse"; import type { Cookie, CookieOptions } from "./types"; export type Options<AS extends AbilitiesSchema> = { usersServer: UsersServer<AS>; domain?: string; maxAge?: number; }; export declare class CookieSetter<AS extends AbilitiesSchema> { #private; constructor({ usersServer, domain, maxAge }: Options<AS>); usersServer: UsersServer<AS>; domain: string | undefined; maxAge: number; set(wssc: WSSCWithUser<AS>, cookie: Cookie, options: CookieOptions): void; unset(wssc: WSSCWithUser<AS>, names: string[]): void; static parse: typeof parseCookie; } //# sourceMappingURL=Setter.d.ts.map