class_docstr: Configuration of SPNEGO authentication to back-end H2O.
code: def _authenticate_request(self, response, **kwargs):
      res, ctx = kerberos.authGSSClientInit(
          self._service_principal, mech_oid=self._mech_oid
      )
      kerberos.authGSSClientStep(ctx, "")
      token = kerberos.authGSSClientResponse(ctx)
      response.request.headers["Authorization"] = "Negotiate " + token
  
      response.content  # NOQA - to drain the stream
      response.raw.release_conn()
      authenticated_response = response.connection.send(
          response.request, **kwargs
      )
      authenticated_response.history.append(response)
      return authenticated_response
  
file_path: h2o-3/h2o-py/h2o/auth.py
imports: import re
  from requests.auth import AuthBase
  from h2o.utils.typechecks import assert_is_type
label_desc: Use image node_id 2 for calling the SpnegoAuth obj's underlying member method code with example usage: obj._authenticate_request(response) and returns: authenticated_response