Fix WWW-Authenticate syntax

This commit is contained in:
Saku Laesvuori 2023-11-01 17:00:50 +02:00
parent 28af340573
commit 34f4df608c
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ verifyBasic BasicAuth {..} = do
correctPassword <- checkPassword password <$> lift dbUserPasswordHash correctPassword <- checkPassword password <$> lift dbUserPasswordHash
if correctPassword if correctPassword
then pure user 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" raiseStatus status401 "Wrong password or email"
newtype APIM a = APIM (ReaderT RequestState IO a) newtype APIM a = APIM (ReaderT RequestState IO a)