summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/auth.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-13 10:14:09 -0700
committerGitHub <noreply@github.com>2019-03-13 10:14:09 -0700
commit1fa664166571ab7dd3abe1b0d64ae9a81a8688ae (patch)
treefc6b218409181bbe49c7c315bcba16ab160d49f4 /vendor/github.com/fsouza/go-dockerclient/auth.go
parent8b3f759800ebd6e53e0a807728ede633aa9bdb36 (diff)
parent8f418f1568b2735fdeea9a84afc354e1f8cbc94c (diff)
downloadpodman-1fa664166571ab7dd3abe1b0d64ae9a81a8688ae.tar.gz
podman-1fa664166571ab7dd3abe1b0d64ae9a81a8688ae.tar.bz2
podman-1fa664166571ab7dd3abe1b0d64ae9a81a8688ae.zip
Merge pull request #2628 from TomSweeneyRedHat/dev/tsweeney/bigvendorbuildah2
Vendor docker/docker, fsouza and more #2
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
}