@@ -213,11 +213,13 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
213
213
"username" : config .CFUsername (),
214
214
"password" : config .CFPassword (),
215
215
}, "" , constant .GrantTypePassword )
216
+ config .SetUAAGrantType (string (constant .GrantTypePassword ))
216
217
} else if config .UAAOAuthClient () != "cf" {
217
218
accessToken , refreshToken , err = uaaClient .Authenticate (map [string ]string {
218
219
"client_id" : config .UAAOAuthClient (),
219
220
"client_secret" : config .UAAOAuthClientSecret (),
220
221
}, "" , constant .GrantTypeClientCredentials )
222
+ config .SetUAAGrantType (string (constant .GrantTypeClientCredentials ))
221
223
}
222
224
if err != nil {
223
225
return fmt .Errorf ("Error when authenticate on cf: %s" , err )
@@ -261,11 +263,13 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf
261
263
"username" : config .CFUsername (),
262
264
"password" : config .CFPassword (),
263
265
}, "" , constant .GrantTypePassword )
266
+ configUaa .SetUAAGrantType (string (constant .GrantTypePassword ))
264
267
} else {
265
268
accessTokenSess , refreshTokenSess , err = uaaClientSess .Authenticate (map [string ]string {
266
269
"client_id" : configUaa .UAAOAuthClient (),
267
270
"client_secret" : configUaa .UAAOAuthClientSecret (),
268
271
}, "" , constant .GrantTypeClientCredentials )
272
+ configUaa .SetUAAGrantType (string (constant .GrantTypeClientCredentials ))
269
273
}
270
274
271
275
if err != nil {
0 commit comments