Skip to content

Instantly share code, notes, and snippets.

@jcrossley3
Created January 21, 2015 00:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcrossley3/d1cf1e90c0a4d1caadfb to your computer and use it in GitHub Desktop.
Save jcrossley3/d1cf1e90c0a4d1caadfb to your computer and use it in GitHub Desktop.
(defn force-login [app]
(fn [req]
(println "force-login: ****** " req "******")
(if (or (= "/login" (:uri req)) (:user (:session req)))
(app req)
(resp/redirect "/login"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment