'Set up kerberos auth for the client, based on the current ticket.'

def set_kerberos_auth(self):

    mutual_auth = conf.KERBEROS.MUTUAL_AUTHENTICATION.get().upper()
    if (mutual_auth == 'OPTIONAL'):
        self._session.auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)
    elif (mutual_auth == 'REQUIRED'):
        self._session.auth = HTTPKerberosAuth(mutual_authentication=REQUIRED)
    elif (mutual_auth == 'DISABLED'):
        self._session.auth = HTTPKerberosAuth(mutual_authentication=DISABLED)
    else:
        self._session.auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL)
    return self
