@barchart/portfolio-client-js 1.1.38 → 1.1.39
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 +3 -11
- package/lib/gateway/jwt/JwtGateway.js +0 -10
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -911,8 +911,6 @@ module.exports = function () {
|
|
|
911
911
|
return Promise.resolve().then(function () {
|
|
912
912
|
checkStart.call(_this3);
|
|
913
913
|
|
|
914
|
-
debugger;
|
|
915
|
-
|
|
916
914
|
return Gateway.invoke(_this3._endpoint);
|
|
917
915
|
}).catch(function (e) {
|
|
918
916
|
var failure = FailureReason.forRequest({ endpoint: _this3._endpoint }).addItem(FailureType.REQUEST_IDENTITY_FAILURE).format();
|
|
@@ -942,8 +940,6 @@ module.exports = function () {
|
|
|
942
940
|
var refreshPromise = scheduler.backoff(function () {
|
|
943
941
|
return _this4.readToken();
|
|
944
942
|
}, 100, 'Read JWT token', 3).then(function (token) {
|
|
945
|
-
debugger;
|
|
946
|
-
|
|
947
943
|
if (_this4._refreshInterval) {
|
|
948
944
|
cachePromise = refreshPromise;
|
|
949
945
|
}
|
|
@@ -1133,17 +1129,13 @@ module.exports = function () {
|
|
|
1133
1129
|
function _forStaging(externalRequestInterceptor) {
|
|
1134
1130
|
return EndpointBuilder.for('translate-jwt-token-for-staging', 'lookup Barchart user identity').withVerb(VerbType.GET).withProtocol(ProtocolType.HTTPS).withHost(Configuration.stagingHost).withPathBuilder(function (pb) {
|
|
1135
1131
|
return pb.withLiteralParameter('token', 'token').withLiteralParameter('system', 'tgam').withLiteralParameter('converter', 'converter');
|
|
1136
|
-
}).withRequestInterceptor(externalRequestInterceptor).withResponseInterceptor(ResponseInterceptor.DATA).
|
|
1137
|
-
return response.token;
|
|
1138
|
-
})).endpoint;
|
|
1132
|
+
}).withRequestInterceptor(externalRequestInterceptor).withResponseInterceptor(ResponseInterceptor.DATA).endpoint;
|
|
1139
1133
|
}
|
|
1140
1134
|
|
|
1141
1135
|
function _forProduction(externalRequestInterceptor) {
|
|
1142
1136
|
return EndpointBuilder.for('translate-jwt-token-for-production', 'lookup Barchart user identity').withVerb(VerbType.GET).withProtocol(ProtocolType.HTTPS).withHost(Configuration.productionHost).withPathBuilder(function (pb) {
|
|
1143
1137
|
return pb.withLiteralParameter('token', 'token').withLiteralParameter('system', 'tgam').withLiteralParameter('converter', 'converter');
|
|
1144
|
-
}).withRequestInterceptor(externalRequestInterceptor).withResponseInterceptor(ResponseInterceptor.DATA).
|
|
1145
|
-
return response.token;
|
|
1146
|
-
})).endpoint;
|
|
1138
|
+
}).withRequestInterceptor(externalRequestInterceptor).withResponseInterceptor(ResponseInterceptor.DATA).endpoint;
|
|
1147
1139
|
}
|
|
1148
1140
|
|
|
1149
1141
|
return JwtGateway;
|
|
@@ -1161,7 +1153,7 @@ module.exports = function () {
|
|
|
1161
1153
|
return {
|
|
1162
1154
|
JwtGateway: JwtGateway,
|
|
1163
1155
|
PortfolioGateway: PortfolioGateway,
|
|
1164
|
-
version: '1.1.
|
|
1156
|
+
version: '1.1.39'
|
|
1165
1157
|
};
|
|
1166
1158
|
}();
|
|
1167
1159
|
|
|
@@ -80,8 +80,6 @@ module.exports = (() => {
|
|
|
80
80
|
.then(() => {
|
|
81
81
|
checkStart.call(this);
|
|
82
82
|
|
|
83
|
-
debugger;
|
|
84
|
-
|
|
85
83
|
return Gateway.invoke(this._endpoint);
|
|
86
84
|
}).catch((e) => {
|
|
87
85
|
const failure = FailureReason.forRequest({ endpoint: this._endpoint })
|
|
@@ -107,8 +105,6 @@ module.exports = (() => {
|
|
|
107
105
|
const refreshToken = () => {
|
|
108
106
|
const refreshPromise = scheduler.backoff(() => this.readToken(), 100, 'Read JWT token', 3)
|
|
109
107
|
.then((token) => {
|
|
110
|
-
debugger;
|
|
111
|
-
|
|
112
108
|
if (this._refreshInterval) {
|
|
113
109
|
cachePromise = refreshPromise;
|
|
114
110
|
}
|
|
@@ -296,9 +292,6 @@ module.exports = (() => {
|
|
|
296
292
|
.withPathBuilder((pb) => pb.withLiteralParameter('token', 'token').withLiteralParameter('system', 'tgam').withLiteralParameter('converter', 'converter'))
|
|
297
293
|
.withRequestInterceptor(externalRequestInterceptor)
|
|
298
294
|
.withResponseInterceptor(ResponseInterceptor.DATA)
|
|
299
|
-
.withResponseInterceptor(ResponseInterceptor.fromDelegate((response) => {
|
|
300
|
-
return response.token;
|
|
301
|
-
}))
|
|
302
295
|
.endpoint;
|
|
303
296
|
}
|
|
304
297
|
|
|
@@ -310,9 +303,6 @@ module.exports = (() => {
|
|
|
310
303
|
.withPathBuilder((pb) => pb.withLiteralParameter('token', 'token').withLiteralParameter('system', 'tgam').withLiteralParameter('converter', 'converter'))
|
|
311
304
|
.withRequestInterceptor(externalRequestInterceptor)
|
|
312
305
|
.withResponseInterceptor(ResponseInterceptor.DATA)
|
|
313
|
-
.withResponseInterceptor(ResponseInterceptor.fromDelegate((response) => {
|
|
314
|
-
return response.token;
|
|
315
|
-
}))
|
|
316
306
|
.endpoint;
|
|
317
307
|
}
|
|
318
308
|
|
package/lib/index.js
CHANGED