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

Function LoginCFWithClientCredentials

integration/helpers/login.go:93–102  ·  view source on GitHub ↗

LoginCFWithClientCredentials logs into the CLI using client credentials from the CF_INT_CLIENT_ID and CF_INT_CLIENT_SECRET environment variables and returns the client ID. If these environment variables are not set, it skips the current test.

()

Source from the content-addressed store, hash-verified

91// CF_INT_CLIENT_SECRET environment variables and returns the client ID. If these environment variables
92// are not set, it skips the current test.
93func LoginCFWithClientCredentials() string {
94 username, password := SkipIfClientCredentialsNotSet()
95 env := map[string]string{
96 "CF_USERNAME": username,
97 "CF_PASSWORD": password,
98 }
99 Eventually(CFWithEnv(env, "auth", "--client-credentials")).Should(Exit(0))
100
101 return username
102}
103
104// GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry.
105func GetCredentials() (string, string) {

Callers 4

LoginCFFunction · 0.85

Calls 2

CFWithEnvFunction · 0.85

Tested by

no test coverage detected