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

Function GetCredentials

integration/helpers/login.go:105–119  ·  view source on GitHub ↗

GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry.

()

Source from the content-addressed store, hash-verified

103
104// GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry.
105func GetCredentials() (string, string) {
106 if ClientCredentialsTestMode() {
107 return SkipIfClientCredentialsNotSet()
108 }
109
110 username := os.Getenv("CF_INT_USERNAME")
111 if username == "" {
112 username = "admin"
113 }
114 password := os.Getenv("CF_INT_PASSWORD")
115 if password == "" {
116 password = "admin"
117 }
118 return username, password
119}
120
121// SkipIfOIDCCredentialsNotSet returns back the username and the password for
122// OIDC origin, or skips the test if those values are not set.

Calls 2

Tested by 1