'Generates the GSSAPI authentication token with kerberos.
If any GSSAPI step fails, return None.'

def generate_request_header(self, response):

    host = urlparse(response.url).hostname
    try:
        (result, self.context[host]) = kerberos.authGSSClientInit('{0}@{1}'.format(self.service, host))
    except kerberos.GSSError:
        log.exception('generate_request_header():    authGSSClientInit()    failed:')
        return None
    if (result < 1):
        log.error('generate_request_header():    authGSSClientInit()    failed:    {0}'.format(result))
        return None
    try:
        result = kerberos.authGSSClientStep(self.context[host], _negotiate_value(response))
    except kerberos.GSSError:
        log.exception('generate_request_header():    authGSSClientStep()    failed:')
        return None
    if (result < 0):
        log.error('generate_request_header():    authGSSClientStep()    failed:    {0}'.format(result))
        return None
    try:
        gss_response = kerberos.authGSSClientResponse(self.context[host])
    except kerberos.GSSError:
        log.exception('generate_request_header():    authGSSClientResponse()    failed:')
        return None
    return 'Negotiate    {0}'.format(gss_response)
