@@ -139,7 +139,6 @@ public bool DisableSslVerification
139
139
/// </summary>
140
140
/// <typeparam name="T">Type of the returned object.</typeparam>
141
141
/// <param name="response">The returned DetailedResponse.</param>
142
- /// <param name="customData">user defined custom data including raw json.</param>
143
142
public delegate void Callback < T > ( DetailedResponse < T > response , IBMError error ) ;
144
143
#endregion
145
144
@@ -278,9 +277,8 @@ private void OnGetToken(DetailedResponse<IamTokenData> response, IBMError error)
278
277
/// </summary>
279
278
/// <param name="callback">The request callback.</param>
280
279
/// <param name="error"> The request error.</param>
281
- /// <param name="customData">Dictionary of custom data.</param>
282
280
/// <returns></returns>
283
- public bool RequestIamToken ( Callback < IamTokenData > callback , Dictionary < string , object > customData = null )
281
+ public bool RequestIamToken ( Callback < IamTokenData > callback )
284
282
{
285
283
if ( callback == null )
286
284
throw new ArgumentNullException ( "successCallback" ) ;
@@ -297,14 +295,6 @@ public bool RequestIamToken(Callback<IamTokenData> callback, Dictionary<string,
297
295
req . Headers . Add ( "Authorization" , "Basic Yng6Yng=" ) ;
298
296
req . OnResponse = OnRequestIamTokenResponse ;
299
297
req . DisableSslVerification = DisableSslVerification ;
300
- req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
301
- if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
302
- {
303
- foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
304
- {
305
- req . Headers . Add ( kvp . Key , kvp . Value ) ;
306
- }
307
- }
308
298
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
309
299
req . Forms [ "grant_type" ] = new RESTConnector . Form ( "urn:ibm:params:oauth:grant-type:apikey" ) ;
310
300
req . Forms [ "apikey" ] = new RESTConnector . Form ( _iamApiKey ) ;
@@ -315,7 +305,6 @@ public bool RequestIamToken(Callback<IamTokenData> callback, Dictionary<string,
315
305
316
306
private class RequestIamTokenRequest : RESTConnector . Request
317
307
{
318
- public Dictionary < string , object > CustomData { get ; set ; }
319
308
public Callback < IamTokenData > Callback { get ; set ; }
320
309
}
321
310
@@ -362,9 +351,8 @@ private void OnRequestIamTokenResponse(RESTConnector.Request req, RESTConnector.
362
351
/// </summary>
363
352
/// <param name="callback">The success callback.</param>
364
353
/// <param name="failCallback">The fail callback.</param>
365
- /// <param name="customData">Dictionary of custom data.</param>
366
354
/// <returns></returns>
367
- public bool RefreshIamToken ( Callback < IamTokenData > callback , Dictionary < string , object > customData = null )
355
+ public bool RefreshIamToken ( Callback < IamTokenData > callback )
368
356
{
369
357
if ( callback == null )
370
358
throw new ArgumentNullException ( "callback" ) ;
@@ -381,14 +369,6 @@ public bool RefreshIamToken(Callback<IamTokenData> callback, Dictionary<string,
381
369
req . Headers . Add ( "Authorization" , "Basic Yng6Yng=" ) ;
382
370
req . OnResponse = OnRefreshIamTokenResponse ;
383
371
req . DisableSslVerification = DisableSslVerification ;
384
- req . CustomData = customData == null ? new Dictionary < string , object > ( ) : customData ;
385
- if ( req . CustomData . ContainsKey ( Constants . String . CUSTOM_REQUEST_HEADERS ) )
386
- {
387
- foreach ( KeyValuePair < string , string > kvp in req . CustomData [ Constants . String . CUSTOM_REQUEST_HEADERS ] as Dictionary < string , string > )
388
- {
389
- req . Headers . Add ( kvp . Key , kvp . Value ) ;
390
- }
391
- }
392
372
req . Forms = new Dictionary < string , RESTConnector . Form > ( ) ;
393
373
req . Forms [ "grant_type" ] = new RESTConnector . Form ( "refresh_token" ) ;
394
374
req . Forms [ "refresh_token" ] = new RESTConnector . Form ( _iamTokenData . RefreshToken ) ;
@@ -399,7 +379,6 @@ public bool RefreshIamToken(Callback<IamTokenData> callback, Dictionary<string,
399
379
private class RefreshIamTokenRequest : RESTConnector . Request
400
380
{
401
381
public Callback < IamTokenData > Callback { get ; set ; }
402
- public Dictionary < string , object > CustomData { get ; set ; }
403
382
}
404
383
405
384
private void OnRefreshIamTokenResponse ( RESTConnector . Request req , RESTConnector . Response resp )
0 commit comments