From 6ee1e3532965265f1276b99aa245bcb2aec867b3 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Mon, 9 Oct 2023 12:48:52 -0700 Subject: [PATCH] Rename username and password prompt variables Co-authored-by: Joshua Casey --- pkg/oidcclient/login.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/oidcclient/login.go b/pkg/oidcclient/login.go index 73a9d729..e3798668 100644 --- a/pkg/oidcclient/login.go +++ b/pkg/oidcclient/login.go @@ -56,8 +56,8 @@ const ( // we set this to be relatively long. overallTimeout = 90 * time.Minute - defaultLDAPUsernamePrompt = "Username: " - defaultLDAPPasswordPrompt = "Password: " + usernamePrompt = "Username: " + passwordPrompt = "Password: " // For CLI-based auth, such as with LDAP upstream identity providers, the user may use these environment variables // to avoid getting interactively prompted for username and password. @@ -513,7 +513,7 @@ func (h *handlerState) getUsernameAndPassword() (string, string, error) { username := h.getEnv(defaultUsernameEnvVarName) if username == "" { - username, err = h.promptForValue(h.ctx, defaultLDAPUsernamePrompt) + username, err = h.promptForValue(h.ctx, usernamePrompt) if err != nil { return "", "", fmt.Errorf("error prompting for username: %w", err) } @@ -523,7 +523,7 @@ func (h *handlerState) getUsernameAndPassword() (string, string, error) { password := h.getEnv(defaultPasswordEnvVarName) if password == "" { - password, err = h.promptForSecret(defaultLDAPPasswordPrompt) + password, err = h.promptForSecret(passwordPrompt) if err != nil { return "", "", fmt.Errorf("error prompting for password: %w", err) }