GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry.
()
| 103 | |
| 104 | // GetCredentials returns back the credentials for the user or client to authenticate with Cloud Foundry. |
| 105 | func 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. |