Krikri::PluginHelpers::DockerLogin
DockerLogin - pure logic for the docker_login plugin: docker config.json auth-entry handling (the real module's DockerFileStore.get/store/erase semantics: base64 "user:pass" entries under auths[<registry>], config rewritten 0600) and login command construction. Split out so this logic is unit-spec-able (execution needs a real registry/docker CLI).
Constants
Class methods
Decodes an auths[server]["auth"] entry ("user:pass", base64). Returns nil for missing/malformed entries.
The registry key auth entries are stored under. Docker's CLI
stores hub credentials under the legacy hub endpoint; passing the
default hub URL to docker login is also how the CLI gets
invoked without an explicit registry argument.
docker login command for the registry. Hub default logins omit
the registry argument (the CLI's own default), everything else
passes the URL; --config points the CLI at the config file's
directory for custom config_path support.
The real module's required_if failure message for state=present.
Current stored credentials for the registry from the parsed config, or nil.
New config JSON string with the registry's auth entry removed.