summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/auth.go
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2019-03-13 11:40:24 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2019-03-13 11:40:39 -0400
commit8f418f1568b2735fdeea9a84afc354e1f8cbc94c (patch)
treefc6b218409181bbe49c7c315bcba16ab160d49f4 /vendor/github.com/fsouza/go-dockerclient/auth.go
parent8b3f759800ebd6e53e0a807728ede633aa9bdb36 (diff)
downloadpodman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.tar.gz
podman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.tar.bz2
podman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.zip
Vendor docker/docker, fsouza and more #2
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Vendors in fsouza/docker-client, docker/docker and a few more related. Of particular note, changes to the TweakCapabilities() function from docker/docker along with the parse.IDMappingOptions() function from Buildah. Please pay particular attention to the related changes in the call from libpod to those functions during the review. Passes baseline tests.
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/auth.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/auth.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/auth.go b/vendor/github.com/fsouza/go-dockerclient/auth.go
index acb3a02be..4335d6e06 100644
--- a/vendor/github.com/fsouza/go-dockerclient/auth.go
+++ b/vendor/github.com/fsouza/go-dockerclient/auth.go
@@ -32,6 +32,9 @@ type AuthConfiguration struct {
// see https://godoc.org/github.com/docker/docker/api/types#AuthConfig
// It can be used in place of password not in conjunction with it
IdentityToken string `json:"identitytoken,omitempty"`
+
+ // RegistryToken can be supplied with the registrytoken
+ RegistryToken string `json:"registrytoken,omitempty"`
}
// AuthConfigurations represents authentication options to use for the
@@ -50,6 +53,7 @@ type dockerConfig struct {
Auth string `json:"auth"`
Email string `json:"email"`
IdentityToken string `json:"identitytoken"`
+ RegistryToken string `json:"registrytoken"`
}
// NewAuthConfigurationsFromFile returns AuthConfigurations from a path containing JSON
@@ -162,6 +166,11 @@ func authConfigs(confs map[string]dockerConfig) (*AuthConfigurations, error) {
authConfig.IdentityToken = conf.IdentityToken
}
+ // if registrytoken provided then zero the password and set it
+ if conf.RegistryToken != "" {
+ authConfig.Password = ""
+ authConfig.RegistryToken = conf.RegistryToken
+ }
c.Configs[reg] = authConfig
}