@barchart/portfolio-client-js 1.3.11 → 1.3.12
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/example/example.js +6 -6
- package/lib/gateway/jwt/JwtGateway.js +3 -3
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -1383,12 +1383,12 @@ module.exports = function () {
|
|
|
1383
1383
|
}, 750, 'Read JWT token', 3).then(function (token) {
|
|
1384
1384
|
if (_this4._refreshInterval) {
|
|
1385
1385
|
cachePromise = refreshPromise;
|
|
1386
|
-
}
|
|
1387
1386
|
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1387
|
+
if (cacheDisposable === null) {
|
|
1388
|
+
cacheDisposable = scheduler.repeat(function () {
|
|
1389
|
+
return refreshToken();
|
|
1390
|
+
}, _this4._refreshInterval, 'Refresh JWT token');
|
|
1391
|
+
}
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
1394
|
return token;
|
|
@@ -1685,7 +1685,7 @@ module.exports = function () {
|
|
|
1685
1685
|
return {
|
|
1686
1686
|
JwtGateway: JwtGateway,
|
|
1687
1687
|
PortfolioGateway: PortfolioGateway,
|
|
1688
|
-
version: '1.3.
|
|
1688
|
+
version: '1.3.12'
|
|
1689
1689
|
};
|
|
1690
1690
|
}();
|
|
1691
1691
|
|
|
@@ -105,10 +105,10 @@ module.exports = (() => {
|
|
|
105
105
|
.then((token) => {
|
|
106
106
|
if (this._refreshInterval) {
|
|
107
107
|
cachePromise = refreshPromise;
|
|
108
|
-
}
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
if (cacheDisposable === null) {
|
|
110
|
+
cacheDisposable = scheduler.repeat(() => refreshToken(), this._refreshInterval, 'Refresh JWT token');
|
|
111
|
+
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
return token;
|
package/lib/index.js
CHANGED