Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

cookieSession

import { cookieSession } from "https://raw.githubusercontent.com/worker-tools/shed/master/index.ts";

Cookie session middleware for worker runtimes.

Requires a cookie store, preferably encrypted or signed.

Important: This will serialize the entire session data and store it in a cookie. It is sent with every request! Only applicable for small session objects. Use storageSession for a traditional, KV store-backed session.

function cookieSession<S extends Rec = Rec>(options?: CookieSessionOptions<S>): <X extends CookieContext>(ax: Awaitable<X>) => Promise<X & CookieSessionContext<S>>;
§
cookieSession<S extends Rec = Rec>(options?: CookieSessionOptions<S>): <X extends CookieContext>(ax: Awaitable<X>) => Promise<X & CookieSessionContext<S>>
[src]

§Type Parameters

§
S extends Rec = Rec
[src]

§Parameters

§
options?: CookieSessionOptions<S> optional
[src]

§Return Type

§
<X extends CookieContext>(ax: Awaitable<X>) => Promise<X & CookieSessionContext<S>>
[src]