'Checks the remote uid of the accelerated daemon vs. the
one specified for this play and will cause the accel
daemon to exit if they don\'t match'

def validate_user(self):

    display.vvvv('sending    request    for    validate_user', host=self._play_context.remote_addr)
    data = dict(mode='validate_user', username=self._play_context.remote_user)
    data = jsonify(data)
    data = keyczar_encrypt(self.key, data)
    if self.send_data(data):
        raise AnsibleError(('Failed    to    send    command    to    %s' % self._play_context.remote_addr))
    display.vvvv('waiting    for    validate_user    response', host=self._play_context.remote_addr)
    while True:
        response = self.recv_data()
        if (not response):
            raise AnsibleError(('Failed    to    get    a    response    from    %s' % self._play_context.remote_addr))
        response = keyczar_decrypt(self.key, response)
        response = json.loads(response)
        if ('pong' in response):
            display.vvvv('received    a    keepalive    packet', host=self._play_context.remote_addr)
            continue
        else:
            display.vvvv(('received    the    validate_user    response:    %s' % response), host=self._play_context.remote_addr)
            break
    if response.get('failed'):
        return False
    else:
        return (response.get('rc') == 0)
