sregistry/auth/secrets.py
def update_client_secrets(backend, updates, secrets=None, save=True):
    '''update client secrets will update the data structure for a particular
       authentication. This should only be used for a (quasi permanent) token
       or similar. The secrets file, if found, is updated and saved by default.
    '''
    if secrets is None:
        secrets = read_client_secrets()
    if backend not in secrets:
        secrets[backend] = {}
    secrets[backend].update(updates)

    # The update typically includes a save
    if save is True:
        secrets_file = get_secrets_file()
        if secrets_file is not None:
            write_json(secrets,secrets_file)

    return secrets
def update_client_secrets(backend, updates, secrets=None, save=True):
    '''update client secrets will update the data structure for a particular
       authentication. This should only be used for a (quasi permanent) token
       or similar. The secrets file, if found, is updated and saved by default.
    '''
    if secrets is None:
        secrets = read_client_secrets()
    if backend not in secrets:
        secrets[backend] = {}
    secrets[backend].update(updates)

    # The update typically includes a save
    if save is True:
        secrets_file = get_secrets_file()
        if secrets_file is not None:
            write_json(secrets,secrets_file)

    return secrets
update client secrets will update the data structure for a particular
       authentication. This should only be used for a (quasi permanent) token
       or similar. The secrets file, if found, is updated and saved by default.