summaryrefslogtreecommitdiff
path: root/pkg/auth/auth.go
diff options
context:
space:
mode:
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) {