def send_GSS_response_and_receive_challenge(self, response):
    token = base64.b64decode(response)
    self.write(messages.Password(token, messages.Authentication.GSS))
    message = self.read_expected_message(messages.Authentication)
    if (message.code != messages.Authentication.GSS_CONTINUE):
        msg = 'Received unexpected message type: Authentication(type={}). Expected type: Authentication(type={})'.format(message.code, messages.Authentication.GSS_CONTINUE)
        self._logger.error(msg)
        raise errors.MessageError(msg)
    return message.auth_data
def send_GSS_response_and_receive_challenge(self, response):
    token = base64.b64decode(response)
    self.write(messages.Password(token, messages.Authentication.GSS))
    message = self.read_expected_message(messages.Authentication)
    if (message.code != messages.Authentication.GSS_CONTINUE):
        msg = 'Received unexpected message type: Authentication(type={}). Expected type: Authentication(type={})'.format(message.code, messages.Authentication.GSS_CONTINUE)
        self._logger.error(msg)
        raise errors.MessageError(msg)
    return message.auth_data