MCPcopy Index your code
hub / github.com/cloudfoundry/cli / decideEndpoint

Method decideEndpoint

cf/commands/login.go:153–168  ·  view source on GitHub ↗
(c flags.FlagContext)

Source from the content-addressed store, hash-verified

151}
152
153func (cmd Login) decideEndpoint(c flags.FlagContext) (string, bool) {
154 endpoint := c.String("a")
155 skipSSL := c.Bool("skip-ssl-validation")
156 if endpoint == "" {
157 endpoint = cmd.config.APIEndpoint()
158 skipSSL = cmd.config.IsSSLDisabled() || skipSSL
159 }
160
161 if endpoint == "" {
162 endpoint = cmd.ui.Ask(T("API endpoint"))
163 } else {
164 cmd.ui.Say(T("API endpoint: {{.Endpoint}}", map[string]interface{}{"Endpoint": terminal.EntityNameColor(endpoint)}))
165 }
166
167 return endpoint, skipSSL
168}
169
170func (cmd Login) authenticateSSO(c flags.FlagContext) error {
171 prompts, err := cmd.authenticator.GetLoginPromptsAndSaveUAAServerURL()

Callers 1

ExecuteMethod · 0.95

Calls 7

EntityNameColorFunction · 0.92
StringMethod · 0.65
BoolMethod · 0.65
APIEndpointMethod · 0.65
IsSSLDisabledMethod · 0.65
AskMethod · 0.65
SayMethod · 0.65

Tested by

no test coverage detected