On 11/13/2012 12:28 PM, Haim Ashkenazi wrote:
Here's how you wrap your application with middleware (root-routes is
your main routes:
(def app
(-> #'root-routes
(friend/authenticate …)
(wrap-keyword-params)
(wrap-params)
…))
Now following your example you can
(web/start app)
Thank you! I had something similar already, but my testing got thwarted
by expecting too much of ring-reload. Now the following does the trick:
(def secured-app
(-> #'root-routes
(friend/authenticate {:credential-fn (partial
creds/bcrypt-credential-fn users)
:workflows [(workflows/interactive-form)]})
wrap-keyword-params
wrap-params
(wrap-session {:store (immutant-session/servlet-store)})))
(web/start secured-app :reload true)
Finding this example helped:
https://github.com/marianoguerra/immutant-recipes/tree/master/friend-acl
--
Thorsten Wilms
thorwil's design for free software:
http://thorwil.wordpress.com/
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en