code: def rebuild_auth(self, prepared_request, response):
          
          if "Authorization" in prepared_request.headers:
              # If we get redirected to a new host, we should strip out
              # any authentication headers.
              prepared_request.headers.pop("Authorization", True)
              prepared_request.prepare_auth(self.auth)
          return
docs: When being redirected we should always strip Authorization
          header, since nonce may not be reused as per OAuth spec.