@aloma.io/integration-sdk 3.3.67 → 3.3.69
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/build/internal/index.mjs
CHANGED
@@ -206,8 +206,12 @@ class OAuth {
|
|
206
206
|
}
|
207
207
|
}
|
208
208
|
async invalidate(err) {
|
209
|
+
if (true)
|
210
|
+
return;
|
211
|
+
if (this._data.access_token === 'invalid')
|
212
|
+
return;
|
209
213
|
console.log('could not obtain access token, marking connector as disconnected', err);
|
210
|
-
await this.update(
|
214
|
+
await this.update('invalid', null);
|
211
215
|
}
|
212
216
|
getClient(arg = {}) {
|
213
217
|
const client = new OAuthFetcher({ ...arg, oauth: this });
|
@@ -421,12 +425,8 @@ ${text}
|
|
421
425
|
return { value: await jwe.encrypt(data, "none", config.id()) };
|
422
426
|
};
|
423
427
|
const saveOAuthResult = async (what) => {
|
424
|
-
|
425
|
-
|
426
|
-
const jwe = await config.validateKeys("RSA-OAEP-256");
|
427
|
-
value = await jwe.encrypt(what, "none", config.id());
|
428
|
-
}
|
429
|
-
;
|
428
|
+
const jwe = await config.validateKeys("RSA-OAEP-256");
|
429
|
+
const value = await jwe.encrypt(what, "none", config.id());
|
430
430
|
const packet = transport.newPacket({});
|
431
431
|
packet.method("connector.config-update");
|
432
432
|
packet.args({
|
package/package.json
CHANGED
package/src/internal/index.mjs
CHANGED
@@ -267,9 +267,12 @@ class OAuth {
|
|
267
267
|
}
|
268
268
|
|
269
269
|
async invalidate(err) {
|
270
|
+
if (true) return;
|
271
|
+
if (this._data.access_token === 'invalid') return;
|
272
|
+
|
270
273
|
console.log('could not obtain access token, marking connector as disconnected', err);
|
271
274
|
|
272
|
-
await this.update(
|
275
|
+
await this.update('invalid', null);
|
273
276
|
}
|
274
277
|
|
275
278
|
getClient(arg = {}) {
|
@@ -525,12 +528,8 @@ ${text}
|
|
525
528
|
};
|
526
529
|
|
527
530
|
const saveOAuthResult = async (what) => {
|
528
|
-
|
529
|
-
|
530
|
-
if (what) {
|
531
|
-
const jwe = await config.validateKeys("RSA-OAEP-256");
|
532
|
-
value = await jwe.encrypt(what, "none", config.id())
|
533
|
-
};
|
531
|
+
const jwe = await config.validateKeys("RSA-OAEP-256");
|
532
|
+
const value = await jwe.encrypt(what, "none", config.id())
|
534
533
|
|
535
534
|
const packet = transport.newPacket({});
|
536
535
|
|