@webex/test-helper-refresh-callback 3.0.0-beta.9 → 3.0.0-beta.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +16 -15
package/dist/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
|
|
9
7
|
exports.default = refreshCallback;
|
|
10
|
-
|
|
11
8
|
/*!
|
|
12
9
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
13
10
|
*/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["refreshCallback","webex","token","request","method","uri","config","tokenUrl","form","grant_type","redirect_uri","refresh_token","auth","user","client_id","pass","client_secret","sendImmediately","shouldRefreshAccessToken","then","body"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Refreshes an access token\n * @param {Webex} webex\n * @param {Token} token\n * @returns {Object}\n */\nexport default function refreshCallback(webex, token) {\n /* eslint-disable camelcase */\n return webex.request({\n
|
|
1
|
+
{"version":3,"names":["refreshCallback","webex","token","request","method","uri","config","tokenUrl","form","grant_type","redirect_uri","refresh_token","auth","user","client_id","pass","client_secret","sendImmediately","shouldRefreshAccessToken","then","body"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Refreshes an access token\n * @param {Webex} webex\n * @param {Token} token\n * @returns {Object}\n */\nexport default function refreshCallback(webex, token) {\n /* eslint-disable camelcase */\n return webex\n .request({\n method: 'POST',\n uri: token.config.tokenUrl,\n form: {\n grant_type: 'refresh_token',\n redirect_uri: token.config.redirect_uri,\n refresh_token: token.refresh_token,\n },\n auth: {\n user: token.config.client_id,\n pass: token.config.client_secret,\n sendImmediately: true,\n },\n shouldRefreshAccessToken: false,\n })\n .then(({body}) => body);\n /* eslint-enable camelcase */\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,eAAe,CAACC,KAAK,EAAEC,KAAK,EAAE;EACpD;EACA,OAAOD,KAAK,CACTE,OAAO,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,GAAG,EAAEH,KAAK,CAACI,MAAM,CAACC,QAAQ;IAC1BC,IAAI,EAAE;MACJC,UAAU,EAAE,eAAe;MAC3BC,YAAY,EAAER,KAAK,CAACI,MAAM,CAACI,YAAY;MACvCC,aAAa,EAAET,KAAK,CAACS;IACvB,CAAC;IACDC,IAAI,EAAE;MACJC,IAAI,EAAEX,KAAK,CAACI,MAAM,CAACQ,SAAS;MAC5BC,IAAI,EAAEb,KAAK,CAACI,MAAM,CAACU,aAAa;MAChCC,eAAe,EAAE;IACnB,CAAC;IACDC,wBAAwB,EAAE;EAC5B,CAAC,CAAC,CACDC,IAAI,CAAC;IAAA,IAAEC,IAAI,QAAJA,IAAI;IAAA,OAAMA,IAAI;EAAA,EAAC;EACzB;AACF"}
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -10,21 +10,22 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export default function refreshCallback(webex, token) {
|
|
12
12
|
/* eslint-disable camelcase */
|
|
13
|
-
return webex
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
return webex
|
|
14
|
+
.request({
|
|
15
|
+
method: 'POST',
|
|
16
|
+
uri: token.config.tokenUrl,
|
|
17
|
+
form: {
|
|
18
|
+
grant_type: 'refresh_token',
|
|
19
|
+
redirect_uri: token.config.redirect_uri,
|
|
20
|
+
refresh_token: token.refresh_token,
|
|
21
|
+
},
|
|
22
|
+
auth: {
|
|
23
|
+
user: token.config.client_id,
|
|
24
|
+
pass: token.config.client_secret,
|
|
25
|
+
sendImmediately: true,
|
|
26
|
+
},
|
|
27
|
+
shouldRefreshAccessToken: false,
|
|
28
|
+
})
|
|
28
29
|
.then(({body}) => body);
|
|
29
30
|
/* eslint-enable camelcase */
|
|
30
31
|
}
|