Back

cookie-store (clj)

(source)

function

(cookie-store) (cookie-store options)
Creates an encrypted cookie storage engine. Accepts the following options: :key - The secret key to encrypt the session cookie. Must be a byte array of exactly 16 bytes. If no key is provided then a random key will be generated. Note that in that case a server restart will invalidate all existing session cookies. :readers - A map of data readers used to read the serialized edn from the cookie. For writing, ensure that each data type has a key in the clojure.core/print-method or clojure.core/print-dup multimethods.

Examples