From 34f4df608cb29d3a0441c236b86752f77eebc6c6 Mon Sep 17 00:00:00 2001 From: Saku Laesvuori Date: Wed, 1 Nov 2023 17:00:50 +0200 Subject: [PATCH] Fix WWW-Authenticate syntax --- backend/src/Datarekisteri/Backend.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/Datarekisteri/Backend.hs b/backend/src/Datarekisteri/Backend.hs index 75e6033..fb61b33 100644 --- a/backend/src/Datarekisteri/Backend.hs +++ b/backend/src/Datarekisteri/Backend.hs @@ -154,7 +154,7 @@ verifyBasic BasicAuth {..} = do correctPassword <- checkPassword password <$> lift dbUserPasswordHash if correctPassword then pure user - else do setHeader "WWW-Authenticate" "Basic realm=\"GraphQL API\", Bearer realm\"GraphQL API\"" + else do setHeader "WWW-Authenticate" "Basic realm=\"GraphQL API\", Bearer realm=\"GraphQL API\"" raiseStatus status401 "Wrong password or email" newtype APIM a = APIM (ReaderT RequestState IO a)