Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jwe_cookie_map/main.ts>JWECookieMap

Easy JWE Cookies for Deno
Go to Latest
class JWECookieMap
extends CookieMap
import { JWECookieMap } from "https://deno.land/x/jwe_cookie_map@v1.0.0-rc0/main.ts";

Provides a way to manage encrypted cookies in a request and response on the server as a single iterable collection. Extends CookieMap.

Constructors

new
JWECookieMap(
request: Headers | Headered,
options?: CookieMapOptions,
cookieConfiguration?: JWECookieConfiguration,
)

Methods

getDecrypted(key: string, decryptOptions?: jose.DecryptOptions)

Decrypt cookies with {@param decryptOptions} overwriting default decryptOptions. Default decryptOptions are set on {@param JWECookieConfiguration}

setEncrypted(
key: string,
payload: jose.JWTPayload,
encryptConfiguration?: chainedJWEEncryptedCall,
)

Encrypt cookies with {@param options} overwriting default cookie options and calling {@param encryptConfiguration} after the default encryptConfiguration is called. Default cookie options and encryptConfiguration are set on {@param JWECookieConfiguration}