'Authenticate a User
This endpoint authenticates a user using the provided credentials
through a regular HTTP basic auth system.  The response contains
cookies that need to be sent with further requests that require
authentication.
This is primarily used internally in Sentry.
Common example::
curl -X ###METHOD### -u username:password ###URL###'

def post(self, request):

    if (not request.user.is_authenticated()):
        return Response(status=400)
    if Authenticator.objects.user_has_2fa(request.user):
        return Response({'2fa_required': True, 'message': 'Cannot    sign-in    with    basic    auth    when    2fa    is    enabled.'}, status=403)
    try:
        auth.login(request._request, request.user)
    except auth.AuthUserPasswordExpired:
        return Response({'message': 'Cannot    sign-in    with    basic    auth    because    password    has    expired.'}, status=403)
    return self.get(request)
