auth

Module Contents

Functions

resolve_repository_name(repo_name)
resolve_index_name(index_name)
get_config_header(client,registry)
split_repo_name(repo_name)
get_credential_store(authconfig,registry)
resolve_authconfig(authconfig,registry=None,credstore_env=None) Returns the authentication data from the given auth configuration for a
_resolve_authconfig_credstore(authconfig,registry,credstore_name,env=None)
convert_to_hostname(url)
decode_auth(auth)
encode_header(auth)
parse_auth(entries,raise_on_error=False) Parses authentication entries
load_config(config_path=None,config_dict=None) Loads authentication data from a Docker configuration file in the given
_load_legacy_config(config_file)
resolve_repository_name(repo_name)
resolve_index_name(index_name)
get_config_header(client, registry)
split_repo_name(repo_name)
get_credential_store(authconfig, registry)
resolve_authconfig(authconfig, registry=None, credstore_env=None)

Returns the authentication data from the given auth configuration for a specific registry. As with the Docker client, legacy entries in the config with full URLs are stripped down to hostnames before checking for a match. Returns None if no match was found.

_resolve_authconfig_credstore(authconfig, registry, credstore_name, env=None)
convert_to_hostname(url)
decode_auth(auth)
encode_header(auth)
parse_auth(entries, raise_on_error=False)

Parses authentication entries

Args:

entries: Dict of authentication entries. raise_on_error: If set to true, an invalid format will raise

InvalidConfigFile
Returns:
Authentication registry.
load_config(config_path=None, config_dict=None)

Loads authentication data from a Docker configuration file in the given root directory or if config_path is passed use given path. Lookup priority:

explicit config_path parameter > DOCKER_CONFIG environment variable > ~/.docker/config.json > ~/.dockercfg
_load_legacy_config(config_file)