MCPcopy
hub / github.com/cloudfoundry/cli / targetAPI

Method targetAPI

command/v7/login_command.go:247–259  ·  view source on GitHub ↗
(settings v7action.TargetSettings)

Source from the content-addressed store, hash-verified

245}
246
247func (cmd *LoginCommand) targetAPI(settings v7action.TargetSettings) error {
248 warnings, err := cmd.Actor.SetTarget(settings)
249 cmd.UI.DisplayWarnings(warnings)
250 if err != nil {
251 return err
252 }
253
254 if strings.HasPrefix(settings.URL, "http:") {
255 cmd.UI.DisplayWarning("Warning: Insecure http API endpoint detected: secure https API endpoints are recommended")
256 }
257
258 return nil
259}
260
261func (cmd *LoginCommand) authenticate() error {
262 var err error

Callers 1

ExecuteMethod · 0.95

Calls 3

SetTargetMethod · 0.65
DisplayWarningsMethod · 0.65
DisplayWarningMethod · 0.65

Tested by

no test coverage detected