Skip to content

Commit

Permalink
Merge pull request #597 from wking/GetAuthentication-for-logged-in
Browse files Browse the repository at this point in the history
pkg/docker/config: Deprecate GetUserLoggedIn
  • Loading branch information
rhatdan authored Apr 12, 2019
2 parents be45336 + ce133c4 commit 37bab02
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions pkg/docker/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ func GetAuthentication(sys *types.SystemContext, registry string) (string, strin
return "", "", nil
}

// GetUserLoggedIn returns the username logged in to registry from either
// auth.json or XDG_RUNTIME_DIR
// Used to tell the user if someone is logged in to the registry when logging in
func GetUserLoggedIn(sys *types.SystemContext, registry string) (string, error) {
path, err := getPathToAuth(sys)
if err != nil {
return "", err
}
username, _, _ := findAuthentication(registry, path, false)
if username != "" {
return username, nil
}
return "", nil
}

// RemoveAuthentication deletes the credentials stored in auth.json
func RemoveAuthentication(sys *types.SystemContext, registry string) error {
return modifyJSON(sys, func(auths *dockerConfigFile) (bool, error) {
Expand Down

0 comments on commit 37bab02

Please sign in to comment.