MCPcopy Create free account
hub / github.com/cloudfoundry/credhub-cli / verifyAuthServerConnection

Function verifyAuthServerConnection

commands/helpers.go:98–110  ·  view source on GitHub ↗
(cfg config.Config, skipTlsValidation bool)

Source from the content-addressed store, hash-verified

96}
97
98func verifyAuthServerConnection(cfg config.Config, skipTlsValidation bool) error {
99 credhubClient, err := credhub.New(cfg.ApiURL, credhub.CaCerts(cfg.CaCerts...), credhub.SkipTLSValidation(skipTlsValidation), credhub.SetHttpTimeout(cfg.HttpTimeout))
100 if err != nil {
101 return err
102 }
103 if !skipTlsValidation {
104 request, _ := http.NewRequest("GET", cfg.AuthURL+"/info", nil)
105 request.Header.Add("Accept", "application/json")
106 _, err = credhubClient.Client().Do(request)
107 }
108
109 return err
110}

Callers 2

ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls 6

NewFunction · 0.92
CaCertsFunction · 0.92
SkipTLSValidationFunction · 0.92
SetHttpTimeoutFunction · 0.92
DoMethod · 0.65
ClientMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…