@webex/test-helper-refresh-callback 2.59.3-next.1 → 2.59.4
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/.eslintrc.js +6 -6
- package/README.md +31 -31
- package/babel.config.js +3 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/jest.config.js +3 -3
- package/package.json +11 -12
- package/process +1 -1
- package/src/index.js +31 -31
package/.eslintrc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const config = {
|
|
2
|
-
root: true,
|
|
3
|
-
extends: ['@webex/eslint-config-legacy'],
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
module.exports = config;
|
|
1
|
+
const config = {
|
|
2
|
+
root: true,
|
|
3
|
+
extends: ['@webex/eslint-config-legacy'],
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
module.exports = config;
|
package/README.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# @webex/test-helper-refresh-callback
|
|
2
|
-
|
|
3
|
-
[](https://github.com/RichardLitt/standard-readme)
|
|
4
|
-
|
|
5
|
-
>
|
|
6
|
-
|
|
7
|
-
- [Install](#install)
|
|
8
|
-
- [Usage](#usage)
|
|
9
|
-
- [Contribute](#contribute)
|
|
10
|
-
- [Maintainers](#maintainers)
|
|
11
|
-
- [License](#license)
|
|
12
|
-
|
|
13
|
-
## Install
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install --save @webex/test-helper-refresh-callback
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
## Maintainers
|
|
22
|
-
|
|
23
|
-
This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
|
|
24
|
-
|
|
25
|
-
## Contribute
|
|
26
|
-
|
|
27
|
-
Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
|
|
1
|
+
# @webex/test-helper-refresh-callback
|
|
2
|
+
|
|
3
|
+
[](https://github.com/RichardLitt/standard-readme)
|
|
4
|
+
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
- [Install](#install)
|
|
8
|
+
- [Usage](#usage)
|
|
9
|
+
- [Contribute](#contribute)
|
|
10
|
+
- [Maintainers](#maintainers)
|
|
11
|
+
- [License](#license)
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save @webex/test-helper-refresh-callback
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
## Maintainers
|
|
22
|
+
|
|
23
|
+
This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
|
|
24
|
+
|
|
25
|
+
## Contribute
|
|
26
|
+
|
|
27
|
+
Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
|
package/babel.config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const babelConfigLegacy = require('@webex/babel-config-legacy');
|
|
2
|
-
|
|
3
|
-
module.exports = babelConfigLegacy;
|
|
1
|
+
const babelConfigLegacy = require('@webex/babel-config-legacy');
|
|
2
|
+
|
|
3
|
+
module.exports = babelConfigLegacy;
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,15 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = refreshCallback;
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Refreshes an access token
|
|
14
|
-
* @param {Webex} webex
|
|
15
|
-
* @param {Token} token
|
|
16
|
-
* @returns {Object}
|
|
12
|
+
/**
|
|
13
|
+
* Refreshes an access token
|
|
14
|
+
* @param {Webex} webex
|
|
15
|
+
* @param {Token} token
|
|
16
|
+
* @returns {Object}
|
|
17
17
|
*/
|
|
18
18
|
function refreshCallback(webex, token) {
|
|
19
19
|
/* eslint-disable camelcase */
|
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","_ref","body"],"sources":["index.js"],"sourcesContent":["/*!\
|
|
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","_ref","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,eAAeA,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,UAAAC,IAAA;IAAA,IAAEC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAA,OAAMA,IAAI;EAAA,EAAC;EACzB;AACF"}
|
package/jest.config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const config = require('@webex/jest-config-legacy');
|
|
2
|
-
|
|
3
|
-
module.exports = config;
|
|
1
|
+
const config = require('@webex/jest-config-legacy');
|
|
2
|
+
|
|
3
|
+
module.exports = config;
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/test-helper-refresh-callback",
|
|
3
|
+
"version": "2.59.4",
|
|
3
4
|
"description": "",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"main": "dist/index.js",
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
"scripts": {
|
|
22
23
|
"build": "yarn build:src",
|
|
23
24
|
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
24
|
-
"deploy:npm": "yarn npm publish",
|
|
25
25
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
26
26
|
"test:browser": "webex-legacy-tools test --integration --unit --runner karma",
|
|
27
27
|
"test:integration": "webex-legacy-tools test --integration --runner mocha",
|
|
@@ -30,16 +30,15 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/core": "^7.17.10",
|
|
33
|
-
"@webex/babel-config-legacy": "
|
|
34
|
-
"@webex/eslint-config-legacy": "
|
|
35
|
-
"@webex/jest-config-legacy": "
|
|
36
|
-
"@webex/legacy-tools": "
|
|
37
|
-
"@webex/test-helper-chai": "
|
|
38
|
-
"@webex/test-helper-mocha": "
|
|
39
|
-
"@webex/test-helper-mock-webex": "
|
|
40
|
-
"@webex/test-helper-test-users": "
|
|
33
|
+
"@webex/babel-config-legacy": "2.59.4",
|
|
34
|
+
"@webex/eslint-config-legacy": "2.59.4",
|
|
35
|
+
"@webex/jest-config-legacy": "2.59.4",
|
|
36
|
+
"@webex/legacy-tools": "2.59.4",
|
|
37
|
+
"@webex/test-helper-chai": "2.59.4",
|
|
38
|
+
"@webex/test-helper-mocha": "2.59.4",
|
|
39
|
+
"@webex/test-helper-mock-webex": "2.59.4",
|
|
40
|
+
"@webex/test-helper-test-users": "2.59.4",
|
|
41
41
|
"eslint": "^8.24.0",
|
|
42
42
|
"prettier": "^2.7.1"
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/process
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {browser: true};
|
|
1
|
+
module.exports = {browser: true};
|
package/src/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Refreshes an access token
|
|
7
|
-
* @param {Webex} webex
|
|
8
|
-
* @param {Token} token
|
|
9
|
-
* @returns {Object}
|
|
10
|
-
*/
|
|
11
|
-
export default function refreshCallback(webex, token) {
|
|
12
|
-
/* eslint-disable camelcase */
|
|
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
|
-
})
|
|
29
|
-
.then(({body}) => body);
|
|
30
|
-
/* eslint-enable camelcase */
|
|
31
|
-
}
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Refreshes an access token
|
|
7
|
+
* @param {Webex} webex
|
|
8
|
+
* @param {Token} token
|
|
9
|
+
* @returns {Object}
|
|
10
|
+
*/
|
|
11
|
+
export default function refreshCallback(webex, token) {
|
|
12
|
+
/* eslint-disable camelcase */
|
|
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
|
+
})
|
|
29
|
+
.then(({body}) => body);
|
|
30
|
+
/* eslint-enable camelcase */
|
|
31
|
+
}
|