Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
merge workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Apr 6, 2012
1 parent cfe2577 commit 7fad2d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cemerick/friend/workflows.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
param))))

(defn interactive-form
[& {:keys [login-uri credential-fn login-failure-handler]}]
[& {:keys [login-uri credential-fn login-failure-handler] :as config}]
(fn [{:keys [uri request-method params] :as request}]
(when (and (= login-uri uri)
(= :post request-method))
Expand All @@ -67,5 +67,6 @@
(with-meta (username-as-identity user-record)
{::friend/workflow :interactive-form
:type ::friend/auth})
((or login-failure-handler #'interactive-login-redirect) request))))))
((or login-failure-handler #'interactive-login-redirect)
(update-in request [::friend/auth-config] #(merge config %))))))))

0 comments on commit 7fad2d2

Please sign in to comment.