tuupola/slim-basic-auth

Setting response body when authentication fails

Youdaman opened this issue · 0 comments

Hi Mika, thanks for the great middleware :)

In the code example for the above section in the readme, to return a proper JSON response (and not a HTML/text response) you should use:

return $response->withJson($data);