def METHOD_NAME(self, r, **kwargs):
    """Resends a request with auth headers, if needed."""
    www_authenticate = r.headers.get('www-authenticate', '').lower()
    if 'basic' in www_authenticate:
        return self._handle_basic_auth_401(r, kwargs)
    if 'digest' in www_authenticate:
        return self._handle_digest_auth_401(r, kwargs)