how to carry out an authentication process for each request sent. The problem i'm currently facing is i'm not able access user data which is sent as a request param. here is what i have tried
(pre-route[:any "/mainpage/*"] {:keys[data]}
(when (not(contains? data "userid"))
//false response
)
)
and the middleware
(defn for-auth [handler]
(fn [req]
(if (contains? (:body (:params req)))
(handler req)
(handler (assoc req :body {})
)
)
)
and i add the middlware too. but neither of them work.. Any idea to access user params..
Thanks