Convert response from drf’s basic authentication mechanism to a swh-deposit one.
request (Request): Use to build the response content (bytes): The drf’s answer
Response with the same status error as before, only the body is now an swh-deposit compliant one.
Middleware to capture potential authentication error and convert them to standard deposit response.
This is to be installed in django’s settings.py module.