Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove API Key suggestion from config command #1277

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions common/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type AuthenticationMethod string

const (
AccessToken AuthenticationMethod = "Access Token"
BasicAuth AuthenticationMethod = "Username and Password / API Key"
BasicAuth AuthenticationMethod = "Username and Password / Reference token"
MTLS AuthenticationMethod = "Mutual TLS"
WebLogin AuthenticationMethod = "Web Login"
)
Expand Down Expand Up @@ -375,10 +375,10 @@ func (cc *ConfigCommand) promptAuthMethods() (selectedMethod AuthenticationMetho

var selected string
authMethods := []AuthenticationMethod{
BasicAuth,
AccessToken,
MTLS,
WebLogin,
BasicAuth,
MTLS,
}
var selectableItems []ioutils.PromptItem
for _, curMethod := range authMethods {
Expand Down Expand Up @@ -820,7 +820,7 @@ func assertSingleAuthMethod(details *config.ServerDetails) error {
details.AccessToken != "" && details.ArtifactoryRefreshToken == "",
details.SshKeyPath != ""}
if coreutils.SumTrueValues(authMethods) > 1 {
return errorutils.CheckErrorf("Only one authentication method is allowed: Username + Password/API key, RSA Token (SSH) or Access Token")
return errorutils.CheckErrorf("Only one authentication method is allowed: Username + Password/Reference Token, RSA Token (SSH) or Access Token")
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion utils/ioutils/ioutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ReadCredentialsFromConsole(details, savedDetails coreutils.Credentials, dis
}

func ScanJFrogPasswordFromConsole() (string, error) {
return ScanPasswordFromConsole("JFrog password or API key: ")
return ScanPasswordFromConsole("JFrog password or Reference Token: ")
}

func ScanPasswordFromConsole(message string) (string, error) {
Expand Down
Loading