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

Make use of :unauthenticated-handler in the http-basic workflow. #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cemerick/friend/workflows.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down