summaryrefslogtreecommitdiff
path: root/pkg/auth/auth.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2021-10-21 19:21:02 +0200
committerMiloslav Trmač <mitr@redhat.com>2021-12-10 18:16:24 +0100
commitfe1230ef7003e89ad9c92fd11e21494ecc64de85 (patch)
tree347784f654581383a1cafba92d19e51ebce5adef /pkg/auth/auth.go
parent3725a34cbf592697d5fca3089d14045c66975fda (diff)
downloadpodman-fe1230ef7003e89ad9c92fd11e21494ecc64de85.tar.gz
podman-fe1230ef7003e89ad9c92fd11e21494ecc64de85.tar.bz2
podman-fe1230ef7003e89ad9c92fd11e21494ecc64de85.zip
Remove pkg/auth.Header
It is no longer used. Split the existing tests into MakeXRegistryConfigHeader and MakeXRegistryAuthHeader variants. For now we don't modify the implementations at all, to make review simpler; cleanups will follow. 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.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go
index 84b2f8ce6..b68109429 100644
--- a/pkg/auth/auth.go
+++ b/pkg/auth/auth.go
@@ -3,7 +3,6 @@ package auth
import (
"encoding/base64"
"encoding/json"
- "fmt"
"io/ioutil"
"net/http"
"os"
@@ -143,18 +142,6 @@ func getAuthCredentials(headers []string) (*types.DockerAuthConfig, map[string]t
return &authConfig, nil, nil
}
-// Header builds the requested Authentication Header
-func Header(sys *types.SystemContext, headerName HeaderAuthName, authfile, username, password string) (map[string]string, error) {
- switch headerName {
- case XRegistryAuthHeader:
- return MakeXRegistryAuthHeader(sys, authfile, username, password)
- case XRegistryConfigHeader:
- return MakeXRegistryConfigHeader(sys, authfile, username, password)
- default:
- return nil, fmt.Errorf("unsupported authentication header: %q", headerName)
- }
-}
-
// 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) {