@@ -182,7 +182,7 @@ OAuthClient.prototype.createToken = function createToken(uri) {
182
182
resolve ( this . getTokenRequest ( request ) ) ;
183
183
} )
184
184
. then ( ( res ) => {
185
- const { response , ... authResponse } = res . json ? res : null ;
185
+ const authResponse = res . json ? res : null ;
186
186
const json = ( authResponse && authResponse . json ) || res ;
187
187
this . token . setToken ( json ) ;
188
188
this . log ( 'info' , 'Create Token response is : ' , JSON . stringify ( authResponse . json , null , 2 ) ) ;
@@ -223,7 +223,7 @@ OAuthClient.prototype.refresh = function refresh() {
223
223
resolve ( this . getTokenRequest ( request ) ) ;
224
224
} )
225
225
. then ( ( res ) => {
226
- const { request , ... authResponse } = res . json ? res : null ;
226
+ const authResponse = res . json ? res : null ;
227
227
const json = ( authResponse && authResponse . json ) || res ;
228
228
this . token . setToken ( json ) ;
229
229
this . log ( 'info' , 'Refresh Token () response is : ' , JSON . stringify ( authResponse . json , null , 2 ) ) ;
@@ -265,7 +265,7 @@ OAuthClient.prototype.refreshUsingToken = function refreshUsingToken(refresh_tok
265
265
resolve ( this . getTokenRequest ( request ) ) ;
266
266
} )
267
267
. then ( ( res ) => {
268
- const { request , ... authResponse } = res . json ? res : null ;
268
+ const authResponse = res . json ? res : null ;
269
269
const json = ( authResponse && authResponse . json ) || res ;
270
270
this . token . setToken ( json ) ;
271
271
this . log (
@@ -316,7 +316,7 @@ OAuthClient.prototype.revoke = function revoke(params) {
316
316
resolve ( this . getTokenRequest ( request ) ) ;
317
317
} )
318
318
. then ( ( res ) => {
319
- const { request , ... authResponse } = res . json ? res : null ;
319
+ const authResponse = res . json ? res : null ;
320
320
this . token . clearToken ( ) ;
321
321
this . log ( 'info' , 'Revoke Token () response is : ' , JSON . stringify ( authResponse . json , null , 2 ) ) ;
322
322
return authResponse ;
@@ -350,7 +350,7 @@ OAuthClient.prototype.getUserInfo = function getUserInfo() {
350
350
resolve ( this . getTokenRequest ( request ) ) ;
351
351
} )
352
352
. then ( ( res ) => {
353
- const { request , ... authResponse } = res . json ? res : null ;
353
+ const authResponse = res . json ? res : null ;
354
354
this . log (
355
355
'info' ,
356
356
'The Get User Info () response is : ' ,
@@ -403,7 +403,7 @@ OAuthClient.prototype.makeApiCall = function makeApiCall(params) {
403
403
resolve ( this . getTokenRequest ( request ) ) ;
404
404
} )
405
405
. then ( ( res ) => {
406
- const { request , ... authResponse } = res . json ? res : null ;
406
+ const authResponse = res . json ? res : null ;
407
407
this . log ( 'info' , 'The makeAPICall () response is : ' , JSON . stringify ( authResponse . json , null , 2 ) ) ;
408
408
return authResponse ;
409
409
} )
0 commit comments