One more set of fixes for new approach.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
[buddy.auth.backends.session :refer [session-backend]]
|
||||
[buddy.auth.backends.token :refer [jws-backend]]
|
||||
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
|
||||
|
||||
[clojure.string :as str]
|
||||
[clojure.tools.logging :as log]
|
||||
[compojure.core :refer [ANY context defroutes GET routes]]
|
||||
@@ -25,6 +26,7 @@
|
||||
[ring.middleware.params :refer [wrap-params]]
|
||||
[ring.middleware.reload :refer [wrap-reload]]
|
||||
[ring.middleware.session :refer [wrap-session]]
|
||||
[ring.middleware.session.cookie :refer [cookie-store]]
|
||||
[ring.util.response :as response]
|
||||
[unilog.context :as lc]))
|
||||
|
||||
@@ -97,9 +99,13 @@
|
||||
(wrap-authorization auth-backend
|
||||
)
|
||||
(wrap-authentication auth-backend
|
||||
(session-backend))
|
||||
(session-backend {:authfn (fn [auth]
|
||||
(dissoc auth :exp))}))
|
||||
|
||||
(wrap-session)
|
||||
(wrap-session {:store (ring.middleware.session.cookie/cookie-store
|
||||
{:key
|
||||
(byte-array
|
||||
[42, 52, -31, 105, -126, -33, -118, -69, -82, -59, -15, -69, -38, 103, -102, -1])} )})
|
||||
(wrap-reload)
|
||||
(wrap-params)
|
||||
(mp/wrap-multipart-params)
|
||||
|
||||
Reference in New Issue
Block a user