slim-basic-auth
slim-basic-auth copied to clipboard
Setting response body when authentication fails
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);