I am using Friend for authentication/authorization in a Clojure Ring application. I am trying to persist session data into a cookie via 'Remember Me' functionality, so that it can survive e.g. server restarts. My handler definition is:
(def secured-routes
(-> app-routes
(friend/authenticate friend-param-map)
(wrap-defaults (-> site-defaults
(assoc-in [:security :anti-forgery] false)
(assoc :session {:store (cookie-store {:key "16-byte-secret"})
:cookie-name "TestCookie"
:cookie-attrs {:max-age 1800}})
(assoc :cookies true)))
wrap-json-params))
What else do I need to write to make it work? Do I need to create a cookie first in one of the app-routes
handlers?
Thanks!