sregistry/auth/secrets.py
def read_client_secrets():
    '''for private or protected registries, a client secrets file is required
       to be located at .sregistry. If no secrets are found, we use default
       of Singularity Hub, and return a dummy secrets.
    '''
    client_secrets = _default_client_secrets()

    # If token file not provided, check environment
    secrets = get_secrets_file()

    # If exists, load
    if secrets is not None:
        client_secrets = read_json(secrets)

    # Otherwise, initialize
    else:
        from sregistry.defaults import SREGISTRY_CLIENT_SECRETS
        write_json(client_secrets, SREGISTRY_CLIENT_SECRETS)

    return client_secrets
def read_client_secrets():
    '''for private or protected registries, a client secrets file is required
       to be located at .sregistry. If no secrets are found, we use default
       of Singularity Hub, and return a dummy secrets.
    '''
    client_secrets = _default_client_secrets()

    # If token file not provided, check environment
    secrets = get_secrets_file()

    # If exists, load
    if secrets is not None:
        client_secrets = read_json(secrets)

    # Otherwise, initialize
    else:
        from sregistry.defaults import SREGISTRY_CLIENT_SECRETS
        write_json(client_secrets, SREGISTRY_CLIENT_SECRETS)

    return client_secrets
def read_client_secrets ( ) : client_secrets = _default_client_secrets ( ) # If token file not provided, check environment secrets = get_secrets_file ( ) # If exists, load if secrets is not None : client_secrets = read_json ( secrets ) # Otherwise, initialize else : from sregistry . defaults import SREGISTRY_CLIENT_SECRETS write_json ( client_secrets , SREGISTRY_CLIENT_SECRETS ) return client_secrets
for private or protected registries, a client secrets file is required
       to be located at .sregistry. If no secrets are found, we use default
       of Singularity Hub, and return a dummy secrets.
for private or protected registries a client secrets file is required to be located at . sregistry . If no secrets are found we use default of Singularity Hub and return a dummy secrets .