|
|
@ -17,8 +17,8 @@
|
|
|
|
(-> (redirect (path :home))
|
|
|
|
(-> (redirect (path :home))
|
|
|
|
(assoc-in [:session :ident] uname)
|
|
|
|
(assoc-in [:session :ident] uname)
|
|
|
|
(assoc-in [:session :uuid] (:uuid unode)))
|
|
|
|
(assoc-in [:session :uuid] (:uuid unode)))
|
|
|
|
(-> (redirect (path :auth-login))
|
|
|
|
(assoc (redirect (path :auth-login))
|
|
|
|
(assoc :flash :invalid-credentials)))))
|
|
|
|
:flash :invalid-credentials))))
|
|
|
|
|
|
|
|
|
|
|
|
(defn login! [req]
|
|
|
|
(defn login! [req]
|
|
|
|
(view/layout!
|
|
|
|
(view/layout!
|
|
|
@ -40,5 +40,5 @@
|
|
|
|
(defroutes routes
|
|
|
|
(defroutes routes
|
|
|
|
(GET (register! :auth-login "/login") [] login!)
|
|
|
|
(GET (register! :auth-login "/login") [] login!)
|
|
|
|
(POST (register! :auth-login-check "/login-check") [] login-check!)
|
|
|
|
(POST (register! :auth-login-check "/login-check") [] login-check!)
|
|
|
|
(GET (register! :auth-logout "/logout") [] (-> (redirect "/login")
|
|
|
|
(GET (register! :auth-logout "/logout") [] (assoc (redirect "/login")
|
|
|
|
(assoc :session nil))))
|
|
|
|
:session nil)))
|
|
|
|