Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Call do-openid-login properly from settings.clj

  • Loading branch information...
commit ddf1f35c52daf4196f3f4f01fc4728951cb228fc 1 parent 0efed6a
Chris Gray authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 src/foreclojure/settings.clj
8 src/foreclojure/settings.clj
@@ -75,12 +75,12 @@
75 75 [:div#button-div
76 76 [:button {:type "submit"} "Submit"]]))})}))
77 77
78   -(defn do-update-settings! [new-username old-pwd new-pwd repeat-pwd email disable-codebox hide-solutions new-openid response-map]
  78 +(defn do-update-settings! [new-username old-pwd new-pwd repeat-pwd email disable-codebox hide-solutions new-openid cookie-val]
79 79 (with-user [{:keys [user pwd openid]}]
80 80 (if (not= openid new-openid)
81 81 (do
82 82 (session/session-put! :login-to "/settings")
83   - (login/do-openid-login (assoc-in response-map [:form-params "openid-url"] new-openid)))
  83 + (login/do-openid-login new-openid cookie-val))
84 84 (let [encryptor (StrongPasswordEncryptor.)
85 85 new-pwd-hash (.encryptPassword encryptor new-pwd)
86 86 new-lower-user (.toLowerCase new-username)]
@@ -117,5 +117,5 @@
117 117
118 118 (defroutes settings-routes
119 119 (GET "/settings" [] (settings-page))
120   - (POST "/settings" {{:strs [new-username old-pwd pwd repeat-pwd email disable-codebox hide-solutions openid]} :form-params :as r}
121   - (do-update-settings! new-username old-pwd pwd repeat-pwd email disable-codebox hide-solutions openid r)))
  120 + (POST "/settings" {{:strs [new-username old-pwd pwd repeat-pwd email disable-codebox hide-solutions openid]} :form-params {:strs [ring-session]} :cookies}
  121 + (do-update-settings! new-username old-pwd pwd repeat-pwd email disable-codebox hide-solutions openid (:value ring-session))))

0 comments on commit ddf1f35

Please sign in to comment.
Something went wrong with that request. Please try again.