The minion sends a request to the master to revoke its own key.
    Note that the minion session will be revoked and the minion may
    not be able to return the result of this command back to the master.

    If the 'preserve_minion_cache' flag is set to True, the master
    cache for this minion will not be removed.

    CLI Example:

    .. code-block:: bash

        salt '*' saltutil.revoke_auth

def revoke_auth(preserve_minion_cache=False):
    '''
    The minion sends a request to the master to revoke its own key.
    Note that the minion session will be revoked and the minion may
    not be able to return the result of this command back to the master.

    If the 'preserve_minion_cache' flag is set to True, the master
    cache for this minion will not be removed.

    CLI Example:

    .. code-block:: bash

        salt '*' saltutil.revoke_auth
    '''
    masters = list()
    ret = True
    if 'master_uri_list' in __opts__:
        for master_uri in __opts__['master_uri_list']:
            masters.append(master_uri)
    else:
        masters.append(__opts__['master_uri'])

    for master in masters:
        channel = salt.transport.client.ReqChannel.factory(__opts__, master_uri=master)
        tok = channel.auth.gen_token(b'salt')
        load = {'cmd': 'revoke_auth',
                'id': __opts__['id'],
                'tok': tok,
                'preserve_minion_cache': preserve_minion_cache}
        try:
            channel.send(load)
        except SaltReqTimeoutError:
            ret = False
        finally:
            channel.close()
    return ret