summaryrefslogtreecommitdiff
path: root/pkg/auth/auth.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2021-10-21 21:27:25 +0200
committerMiloslav Trmač <mitr@redhat.com>2021-12-10 18:16:26 +0100
commitf9be3262740a2961f5c1a4db24265234a3fc6a5f (patch)
tree230309366cd0a267e38a5066376949969e0881b8 /pkg/auth/auth.go
parent935dcbb0088a667406dd00562ea8fc1fbc00f3ef (diff)
downloadpodman-f9be3262740a2961f5c1a4db24265234a3fc6a5f.tar.gz
podman-f9be3262740a2961f5c1a4db24265234a3fc6a5f.tar.bz2
podman-f9be3262740a2961f5c1a4db24265234a3fc6a5f.zip
Remove the authfile parameter of MakeXRegistryConfigHeader
Having a parameter that modifies the provides types.SystemContext seems rather unexpected and risky to have around - and the only user of that is actually a no-op; so, remove that option and simplify. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg/auth/auth.go')
-rw-r--r--pkg/auth/auth.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go
index b68109429..006572b09 100644
--- a/pkg/auth/auth.go
+++ b/pkg/auth/auth.go
@@ -144,13 +144,10 @@ func getAuthCredentials(headers []string) (*types.DockerAuthConfig, map[string]t
// MakeXRegistryConfigHeader returns a map with the XRegistryConfigHeader set which can
// conveniently be used in the http stack.
-func MakeXRegistryConfigHeader(sys *types.SystemContext, authfile, username, password string) (map[string]string, error) {
+func MakeXRegistryConfigHeader(sys *types.SystemContext, username, password string) (map[string]string, error) {
if sys == nil {
sys = &types.SystemContext{}
}
- if authfile != "" {
- sys.AuthFilePath = authfile
- }
authConfigs, err := imageAuth.GetAllCredentials(sys)
if err != nil {
return nil, err