From 828247832e836ae69838a2c2c627ae64a96df85a Mon Sep 17 00:00:00 2001 From: Damion Junk Date: Sun, 27 Oct 2013 21:21:01 -0400 Subject: [PATCH] Make use of `:unauthenticated-handler` in the `http-basic` workflow. Setting the `:unauthenticated-handler` had no effect previously. If not set, the call to `http-basic-deny` still takes place as it did before. --- src/cemerick/friend/workflows.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cemerick/friend/workflows.clj b/src/cemerick/friend/workflows.clj index ab4e49a..021b76f 100644 --- a/src/cemerick/friend/workflows.clj +++ b/src/cemerick/friend/workflows.clj @@ -54,7 +54,8 @@ (make-auth user-record {::friend/workflow :http-basic ::friend/redirect-on-auth? false}) - (http-basic-deny realm request)) + ((or (:unauthenticated-handler (::friend/auth-config request)) + (partial http-basic-deny realm)) request)) {:status 400 :body "Malformed Authorization header for HTTP Basic authentication."})))) (defn interactive-login-redirect