• (cookie-store)
  • (cookie-store options)
Creates an encrypted cookie storage engine.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source ring/middleware/session/cookie.clj:80 top

(defn cookie-store
  "Creates an encrypted cookie storage engine."
    (cookie-store {}))
    (let [secret-key (get-secret-key options)]
      {:read (fn [session-data]
               (if session-data
                 (or (unseal secret-key session-data) {})
       :write (fn [_ session]
                (seal secret-key session))
       :delete (fn [_]
                 (seal secret-key {}))})))
Vars in ring.middleware.session.cookie/cookie-store: defn let
Used in 0 other vars

Comments top

No comments for cookie-store. Log in to add a comment.