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

Method AuthURL

credhub/info.go:33–51  ·  view source on GitHub ↗

AuthURL returns the targeted CredHub server's trusted authentication server URL.

()

Source from the content-addressed store, hash-verified

31
32// AuthURL returns the targeted CredHub server's trusted authentication server URL.
33func (ch *CredHub) AuthURL() (string, error) {
34 if ch.authURL != nil {
35 return ch.authURL.String(), nil
36 }
37
38 info, err := ch.Info()
39
40 if err != nil {
41 return "", err
42 }
43
44 authURL := info.AuthServer.URL
45
46 if authURL == "" {
47 return "", errors.New("AuthURL not found")
48 }
49
50 return authURL, nil
51}

Callers

nothing calls this directly

Calls 2

InfoMethod · 0.95
StringMethod · 0.80

Tested by

no test coverage detected