'Handles user authentication with gssapi/kerberos'

def authenticate_user(self, response, **kwargs):

    auth_header = self.generate_request_header(response)
    if (auth_header is None):
        return response
    log.debug('authenticate_user():    Authorization    header:    {0}'.format(auth_header))
    response.request.headers['Authorization'] = auth_header
    response.content
    response.raw.release_conn()
    _r = response.connection.send(response.request, **kwargs)
    _r.history.append(response)
    log.debug('authenticate_user():    returning    {0}'.format(_r))
    return _r
