Skip to content

Commit b337e12

Browse files
committed
Use issued jwt not config jwt in nodered nodes
1 parent e1fe47e commit b337e12

4 files changed

Lines changed: 30 additions & 30 deletions

File tree

OpenFlowNodeRED/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openflow-nodered",
3-
"version": "1.1.17",
3+
"version": "1.1.18",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

OpenFlowNodeRED/src/nodered/nodes/api_nodes.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ export class api_get {
134134
if (!NoderedUtil.IsNullUndefinded(msg.orderby)) { this.config.orderby = msg.orderby; }
135135
if (!NoderedUtil.IsNullEmpty(msg.top)) { this.config.top = parseInt(msg.top); }
136136
if (!NoderedUtil.IsNullEmpty(msg.skip)) { this.config.skip = parseInt(msg.skip); }
137-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
138-
msg.jwt = Config.jwt;
139-
}
137+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
138+
// msg.jwt = Config.jwt;
139+
// }
140140

141141
if (NoderedUtil.IsNullEmpty(this.config.top)) { this.config.top = 500; }
142142
if (NoderedUtil.IsNullEmpty(this.config.skip)) { this.config.skip = 0; }
@@ -237,9 +237,9 @@ export class api_add {
237237
if (!NoderedUtil.IsNullEmpty(msg.resultfield)) { this.config.resultfield = msg.resultfield; }
238238
if (!NoderedUtil.IsNullEmpty(msg.writeconcern)) { this.config.writeconcern = msg.writeconcern; }
239239
if (!NoderedUtil.IsNullEmpty(msg.journal)) { this.config.journal = msg.journal; }
240-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
241-
msg.jwt = Config.jwt;
242-
}
240+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
241+
// msg.jwt = Config.jwt;
242+
// }
243243

244244

245245
if ((this.config.writeconcern as any) === undefined || (this.config.writeconcern as any) === null) this.config.writeconcern = 0;
@@ -313,9 +313,9 @@ export class api_update {
313313
if (!NoderedUtil.IsNullEmpty(msg.resultfield)) { this.config.resultfield = msg.resultfield; }
314314
if (!NoderedUtil.IsNullEmpty(msg.writeconcern)) { this.config.writeconcern = msg.writeconcern; }
315315
if (!NoderedUtil.IsNullEmpty(msg.journal)) { this.config.journal = msg.journal; }
316-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
317-
msg.jwt = Config.jwt;
318-
}
316+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
317+
// msg.jwt = Config.jwt;
318+
// }
319319

320320
if ((this.config.writeconcern as any) === undefined || (this.config.writeconcern as any) === null) this.config.writeconcern = 0;
321321
if ((this.config.journal as any) === undefined || (this.config.journal as any) === null) this.config.journal = false;
@@ -389,9 +389,9 @@ export class api_addorupdate {
389389
if (!NoderedUtil.IsNullEmpty(msg.uniqeness)) { this.config.uniqeness = msg.uniqeness; }
390390
if (!NoderedUtil.IsNullEmpty(msg.writeconcern)) { this.config.writeconcern = msg.writeconcern; }
391391
if (!NoderedUtil.IsNullEmpty(msg.journal)) { this.config.journal = msg.journal; }
392-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
393-
msg.jwt = Config.jwt;
394-
}
392+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
393+
// msg.jwt = Config.jwt;
394+
// }
395395

396396
if ((this.config.writeconcern as any) === undefined || (this.config.writeconcern as any) === null) this.config.writeconcern = 0;
397397
if ((this.config.journal as any) === undefined || (this.config.journal as any) === null) this.config.journal = false;
@@ -474,9 +474,9 @@ export class api_delete {
474474

475475
if (!NoderedUtil.IsNullEmpty(msg.collection)) { this.config.collection = msg.collection; }
476476
if (!NoderedUtil.IsNullEmpty(msg.inputfield)) { this.config.inputfield = msg.inputfield; }
477-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
478-
msg.jwt = Config.jwt;
479-
}
477+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
478+
// msg.jwt = Config.jwt;
479+
// }
480480

481481
var data: any[] = [];
482482
var _data = NoderedUtil.FetchFromObject(msg, this.config.inputfield);
@@ -546,9 +546,9 @@ export class api_map_reduce {
546546
if (!NoderedUtil.IsNullUndefinded(msg.finalize)) { this.config.finalize = msg.finalize; }
547547
if (!NoderedUtil.IsNullUndefinded(msg.scope)) { this.config.finalize = msg.scope; }
548548
if (!NoderedUtil.IsNullUndefinded(msg.query)) { this.config.query = msg.query; }
549-
if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
550-
msg.jwt = Config.jwt;
551-
}
549+
// if (NoderedUtil.IsNullEmpty(msg.jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
550+
// msg.jwt = Config.jwt;
551+
// }
552552

553553
var scope = NoderedUtil.FetchFromObject(msg, this.config.scope);
554554
var _output: any = {};
@@ -706,9 +706,9 @@ export class api_updatedocument {
706706
if (!NoderedUtil.IsNullEmpty(msg.collection)) { collection = msg.collection; }
707707
if (!NoderedUtil.IsNullEmpty(msg.writeconcern)) { writeconcern = msg.writeconcern; }
708708
if (!NoderedUtil.IsNullEmpty(msg.journal)) { journal = msg.journal; }
709-
if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
710-
jwt = Config.jwt;
711-
}
709+
// if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
710+
// jwt = Config.jwt;
711+
// }
712712

713713
if ((writeconcern as any) === undefined || (writeconcern as any) === null) writeconcern = 0;
714714
if ((journal as any) === undefined || (journal as any) === null) journal = false;
@@ -915,9 +915,9 @@ export class download_file {
915915

916916
if (!NoderedUtil.IsNullEmpty(msg.fileid)) { this.config.fileid = msg.fileid; }
917917
if (!NoderedUtil.IsNullEmpty(msg.filename)) { this.config.filename = msg.filename; }
918-
if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
919-
jwt = Config.jwt;
920-
}
918+
// if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
919+
// jwt = Config.jwt;
920+
// }
921921

922922
this.node.status({ fill: "blue", shape: "dot", text: "Getting file" });
923923
var file = await NoderedUtil.GetFile(filename, fileid, jwt);
@@ -962,9 +962,9 @@ export class upload_file {
962962
var mimeType = this.config.mimeType;
963963
if (!NoderedUtil.IsNullEmpty(msg.filename)) { filename = msg.filename; }
964964
if (!NoderedUtil.IsNullEmpty(msg.mimeType)) { mimeType = msg.mimeType; }
965-
if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
966-
jwt = Config.jwt;
967-
}
965+
// if (NoderedUtil.IsNullEmpty(jwt) && !NoderedUtil.IsNullEmpty(Config.jwt)) {
966+
// jwt = Config.jwt;
967+
// }
968968

969969

970970
this.node.status({ fill: "blue", shape: "dot", text: "Saving file" });

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.17
1+
1.1.18

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openiap",
3-
"version": "1.1.17",
3+
"version": "1.1.18",
44
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)