Skip to content

Commit

Permalink
Remove Api Key suggestion from config command (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino authored Oct 1, 2024
1 parent 4072b13 commit 1e7a45d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 1e7a45d

Please sign in to comment.