Created
May 11, 2012 14:10
-
-
Save dmozzy/2659909 to your computer and use it in GitHub Desktop.
Adding Google Authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Middleware to add authentication | |
(defn require-login [application] | |
(fn [request] | |
(if | |
(aeu/user-logged-in?) | |
(application request) | |
(ring-response/redirect | |
(aeu/login-url)) | |
))) | |
;Adding the middleware to the app | |
(def app (require-login (comp-handler/api geotasklist-main-handler))) | |
;Defining the app | |
(ae/def-appengine-app geotasklist-app (var app)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment