@@ -230,20 +230,20 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
230
230
// try connecting with SSO passcode to retrieve access token and refresh token
231
231
accessToken , refreshToken , err = uaaClient .Authenticate (map [string ]string {
232
232
"passcode" : configSess .SSOPasscode ,
233
- }, "" , constant .GrantTypePassword )
233
+ }, configSess . Origin , constant .GrantTypePassword )
234
234
errType = "SSO passcode"
235
235
} else if config .CFUsername () != "" {
236
236
// try connecting with pair given on uaa to retrieve access token and refresh token
237
237
accessToken , refreshToken , err = uaaClient .Authenticate (map [string ]string {
238
238
"username" : config .CFUsername (),
239
239
"password" : config .CFPassword (),
240
- }, "" , constant .GrantTypePassword )
240
+ }, configSess . Origin , constant .GrantTypePassword )
241
241
errType = "username/password"
242
242
} else if config .UAAOAuthClient () != "cf" {
243
243
accessToken , refreshToken , err = uaaClient .Authenticate (map [string ]string {
244
244
"client_id" : config .UAAOAuthClient (),
245
245
"client_secret" : config .UAAOAuthClientSecret (),
246
- }, "" , constant .GrantTypeClientCredentials )
246
+ }, configSess . Origin , constant .GrantTypeClientCredentials )
247
247
errType = "client_id/client_secret"
248
248
}
249
249
if err != nil {
@@ -295,7 +295,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
295
295
accessTokenSess , refreshTokenSess , err = uaaClientSess .Authenticate (map [string ]string {
296
296
"client_id" : configUaa .UAAOAuthClient (),
297
297
"client_secret" : configUaa .UAAOAuthClientSecret (),
298
- }, "" , constant .GrantTypeClientCredentials )
298
+ }, configSess . Origin , constant .GrantTypeClientCredentials )
299
299
}
300
300
301
301
if err != nil {
0 commit comments