@itentialopensource/adapter-okta 0.1.1 → 0.3.0

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.
Files changed (57) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +1735 -0
  4. package/CHANGELOG.md +17 -2
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +237 -574
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +380 -261
  14. package/adapterBase.js +854 -408
  15. package/changelogs/changelog.md +16 -0
  16. package/entities/.generic/action.json +110 -5
  17. package/entities/.generic/schema.json +6 -1
  18. package/error.json +6 -0
  19. package/metadata.json +49 -0
  20. package/package.json +27 -24
  21. package/pronghorn.json +691 -88
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +843 -7
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapter-openapi.json +22861 -0
  26. package/report/adapter-openapi.yaml +15054 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1654086669778.json +120 -0
  29. package/report/updateReport1691508740078.json +120 -0
  30. package/report/updateReport1692203198064.json +120 -0
  31. package/report/updateReport1694468322367.json +120 -0
  32. package/report/updateReport1698422603278.json +120 -0
  33. package/sampleProperties.json +156 -3
  34. package/test/integration/adapterTestBasicGet.js +3 -5
  35. package/test/integration/adapterTestConnectivity.js +91 -42
  36. package/test/integration/adapterTestIntegration.js +155 -104
  37. package/test/unit/adapterBaseTestUnit.js +392 -309
  38. package/test/unit/adapterTestUnit.js +521 -273
  39. package/utils/adapterInfo.js +206 -0
  40. package/utils/addAuth.js +94 -0
  41. package/utils/artifactize.js +1 -1
  42. package/utils/basicGet.js +1 -14
  43. package/utils/checkMigrate.js +1 -1
  44. package/utils/entitiesToDB.js +179 -0
  45. package/utils/findPath.js +1 -1
  46. package/utils/methodDocumentor.js +273 -0
  47. package/utils/modify.js +14 -16
  48. package/utils/packModificationScript.js +1 -1
  49. package/utils/patches2bundledDeps.js +90 -0
  50. package/utils/pre-commit.sh +5 -0
  51. package/utils/removeHooks.js +20 -0
  52. package/utils/taskMover.js +309 -0
  53. package/utils/tbScript.js +129 -53
  54. package/utils/tbUtils.js +152 -35
  55. package/utils/testRunner.js +17 -17
  56. package/utils/troubleshootingAdapter.js +10 -31
  57. package/workflows/README.md +0 -3
@@ -4,11 +4,13 @@
4
4
  "properties": {
5
5
  "host": "your-subdomain.okta.com",
6
6
  "port": 443,
7
+ "choosepath": "",
7
8
  "base_path": "/",
8
9
  "version": "",
9
10
  "cache_location": "none",
10
11
  "encode_pathvars": true,
11
- "save_metric": true,
12
+ "encode_queryvars": true,
13
+ "save_metric": false,
12
14
  "stub": false,
13
15
  "protocol": "https",
14
16
  "authentication": {
@@ -21,12 +23,30 @@
21
23
  "invalid_token_error": 401,
22
24
  "auth_field": "header.headers.Authorization",
23
25
  "auth_field_format": "SSWS {token}",
24
- "auth_logging": false
26
+ "auth_logging": false,
27
+ "client_id": "",
28
+ "client_secret": "",
29
+ "grant_type": "",
30
+ "sensitive": [],
31
+ "sso": {
32
+ "protocol": "",
33
+ "host": "",
34
+ "port": 0
35
+ },
36
+ "multiStepAuthCalls": [
37
+ {
38
+ "name": "",
39
+ "requestFields": {},
40
+ "responseFields": {},
41
+ "successfullResponseCode": 200
42
+ }
43
+ ]
25
44
  },
26
45
  "healthcheck": {
27
46
  "type": "none",
28
47
  "frequency": 60000,
29
- "query_object": {}
48
+ "query_object": {},
49
+ "addlHeaders": {}
30
50
  },
31
51
  "throttle": {
32
52
  "throttle_enabled": false,
@@ -94,6 +114,139 @@
94
114
  "key_file": "",
95
115
  "cert_file": ""
96
116
  }
117
+ },
118
+ "devicebroker": {
119
+ "getDevice": [
120
+ {
121
+ "path": "/get/devices/{id}",
122
+ "method": "GET",
123
+ "query": {},
124
+ "body": {},
125
+ "headers": {},
126
+ "handleFailure": "ignore",
127
+ "requestFields": {
128
+ "id": "name"
129
+ },
130
+ "responseDatakey": "",
131
+ "responseFields": {
132
+ "name": "host",
133
+ "ostype": "os",
134
+ "ostypePrefix": "system-",
135
+ "ipaddress": "attributes.ipaddr",
136
+ "port": "443"
137
+ }
138
+ }
139
+ ],
140
+ "getDevicesFiltered": [
141
+ {
142
+ "path": "/get/devices",
143
+ "method": "GET",
144
+ "pagination": {
145
+ "offsetVar": "",
146
+ "limitVar": "",
147
+ "incrementBy": "limit",
148
+ "requestLocation": "query"
149
+ },
150
+ "query": {},
151
+ "body": {},
152
+ "headers": {},
153
+ "handleFailure": "ignore",
154
+ "requestFields": {},
155
+ "responseDatakey": "",
156
+ "responseFields": {
157
+ "name": "host",
158
+ "ostype": "os",
159
+ "ostypePrefix": "system-",
160
+ "ipaddress": "attributes.ipaddr",
161
+ "port": "443"
162
+ }
163
+ }
164
+ ],
165
+ "isAlive": [
166
+ {
167
+ "path": "/get/devices/{id}/status",
168
+ "method": "GET",
169
+ "query": {},
170
+ "body": {},
171
+ "headers": {},
172
+ "handleFailure": "ignore",
173
+ "requestFields": {
174
+ "id": "name"
175
+ },
176
+ "responseDatakey": "",
177
+ "responseFields": {
178
+ "status": "status",
179
+ "statusValue": "online"
180
+ }
181
+ }
182
+ ],
183
+ "getConfig": [
184
+ {
185
+ "path": "/get/devices/{id}/configPart1",
186
+ "method": "GET",
187
+ "query": {},
188
+ "body": {},
189
+ "headers": {},
190
+ "handleFailure": "ignore",
191
+ "requestFields": {
192
+ "id": "name"
193
+ },
194
+ "responseDatakey": "",
195
+ "responseFields": {}
196
+ }
197
+ ],
198
+ "getCount": [
199
+ {
200
+ "path": "/get/devices",
201
+ "method": "GET",
202
+ "query": {},
203
+ "body": {},
204
+ "headers": {},
205
+ "handleFailure": "ignore",
206
+ "requestFields": {},
207
+ "responseDatakey": "",
208
+ "responseFields": {}
209
+ }
210
+ ]
211
+ },
212
+ "cache": {
213
+ "enabled": false,
214
+ "entities": [
215
+ {
216
+ "entityType": "",
217
+ "frequency": 1440,
218
+ "flushOnFail": false,
219
+ "limit": 1000,
220
+ "retryAttempts": 5,
221
+ "sort": true,
222
+ "populate": [
223
+ {
224
+ "path": "",
225
+ "method": "GET",
226
+ "pagination": {
227
+ "offsetVar": "",
228
+ "limitVar": "",
229
+ "incrementBy": "limit",
230
+ "requestLocation": "query"
231
+ },
232
+ "query": {},
233
+ "body": {},
234
+ "headers": {},
235
+ "handleFailure": "ignore",
236
+ "requestFields": {},
237
+ "responseDatakey": "",
238
+ "responseFields": {}
239
+ }
240
+ ],
241
+ "cachedTasks": [
242
+ {
243
+ "name": "",
244
+ "filterField": "",
245
+ "filterLoc": ""
246
+ }
247
+ ]
248
+ }
249
+ ]
97
250
  }
98
251
  },
99
252
  "groups": [],
@@ -7,9 +7,9 @@
7
7
  /* eslint import/no-dynamic-require: warn */
8
8
  /* eslint import/no-unresolved: warn */
9
9
 
10
- const mocha = require('mocha');
11
10
  const path = require('path');
12
11
  const assert = require('assert');
12
+ const mocha = require('mocha');
13
13
  const itParam = require('mocha-param');
14
14
 
15
15
  const utils = require('../../utils/tbUtils');
@@ -18,12 +18,10 @@ const { name } = require('../../package.json');
18
18
  const { methods } = require('../../pronghorn.json');
19
19
 
20
20
  const getPronghornProps = (iapDir) => {
21
- const { Discovery } = require('@itential/itential-utils');
22
21
  console.log('Retrieving properties.json file...');
23
22
  const rawProps = require(path.join(iapDir, 'properties.json'));
24
23
  console.log('Decrypting properties...');
25
- const discovery = new Discovery();
26
- const pronghornProps = utils.decryptProperties(rawProps, path.join(__dirname, '..'), discovery);
24
+ const pronghornProps = utils.decryptProperties(rawProps, iapDir);
27
25
  console.log('Found properties.\n');
28
26
  return pronghornProps;
29
27
  };
@@ -34,7 +32,7 @@ describe('[integration] Adapter BasicGET Test', () => {
34
32
  context('Testing GET calls without query parameters', () => {
35
33
  before(async () => {
36
34
  const iapDir = path.join(__dirname, '../../../../../');
37
- if (!utils.withinIAP(iapDir)) {
35
+ if (!utils.areWeUnderIAPinstallationDirectory()) {
38
36
  const sampleProperties = require('../../sampleProperties.json');
39
37
  const adapter = { properties: sampleProperties };
40
38
  a = basicGet.getAdapterInstance(adapter);
@@ -3,9 +3,12 @@
3
3
  /* global describe it context before after */
4
4
  /* eslint no-unused-vars: warn */
5
5
 
6
- const mocha = require('mocha');
7
6
  const assert = require('assert');
8
- const diagnostics = require('network-diagnostics');
7
+ const http = require('http');
8
+ const https = require('https');
9
+ const mocha = require('mocha');
10
+ const ping = require('ping');
11
+ const dnsLookup = require('dns-lookup-promise');
9
12
 
10
13
  let host;
11
14
  process.argv.forEach((val) => {
@@ -16,78 +19,124 @@ process.argv.forEach((val) => {
16
19
 
17
20
  describe('[integration] Adapter Test', () => {
18
21
  context(`Testing network connection on ${host}`, () => {
19
- before(() => {
20
- diagnostics.setTestURL(host);
21
- });
22
-
23
22
  after((done) => {
24
23
  done();
25
24
  });
26
25
 
27
26
  it('DNS resolve', (done) => {
28
- diagnostics.haveDNS((result) => {
29
- try {
30
- assert.equal(result, true);
31
- done();
32
- } catch (error) {
33
- done(error);
34
- }
35
- });
27
+ dnsLookup(host)
28
+ .then((addresses) => {
29
+ try {
30
+ assert.ok(addresses.length > 0);
31
+ done();
32
+ } catch (error) {
33
+ done(error);
34
+ }
35
+ })
36
+ .catch((err) => {
37
+ done(err);
38
+ });
36
39
  });
37
40
 
38
41
  it('Responds to ping', (done) => {
39
- diagnostics.havePing((result) => {
40
- try {
41
- assert.equal(result, true);
42
- done();
43
- } catch (error) {
44
- done(error);
45
- }
46
- });
42
+ ping.promise.probe(host)
43
+ .then((result) => {
44
+ try {
45
+ assert.ok(result.alive);
46
+ done();
47
+ } catch (error) {
48
+ done(error);
49
+ }
50
+ })
51
+ .catch((err) => {
52
+ done(err);
53
+ });
47
54
  });
48
55
 
49
56
  it('Support HTTP on port 80', (done) => {
50
- diagnostics.haveHTTP((result) => {
57
+ const requestOptions = {
58
+ host,
59
+ port: 80,
60
+ method: 'HEAD'
61
+ };
62
+
63
+ const req = http.request(requestOptions, (res) => {
51
64
  try {
52
- assert.equal(result, true);
65
+ assert.ok(res.statusCode >= 200 && res.statusCode < 400);
53
66
  done();
54
67
  } catch (error) {
55
68
  done(error);
56
69
  }
57
70
  });
71
+
72
+ req.on('error', (err) => {
73
+ done(err);
74
+ });
75
+
76
+ req.end();
58
77
  });
59
78
 
60
79
  it('Support HTTPS on port 443', (done) => {
61
- diagnostics.haveHTTPS((result) => {
80
+ const requestOptions = {
81
+ host,
82
+ port: 443,
83
+ method: 'HEAD'
84
+ };
85
+
86
+ const req = https.request(requestOptions, (res) => {
62
87
  try {
63
- assert.equal(result, true);
88
+ assert.ok(res.statusCode >= 200 && res.statusCode < 400);
64
89
  done();
65
90
  } catch (error) {
66
91
  done(error);
67
92
  }
68
93
  });
94
+
95
+ req.on('error', (err) => {
96
+ done(err);
97
+ });
98
+
99
+ req.end();
69
100
  });
70
101
 
71
102
  it('Support IPv4', (done) => {
72
- diagnostics.haveIPv4Async((result) => {
73
- try {
74
- assert.equal(result, true);
75
- done();
76
- } catch (error) {
77
- done(error);
78
- }
79
- });
103
+ const options = {
104
+ family: 4,
105
+ hints: dnsLookup.ADDRCONFIG
106
+ };
107
+
108
+ dnsLookup.lookup(host, options)
109
+ .then((address, family) => {
110
+ try {
111
+ assert.ok(address !== null && family === 4);
112
+ done();
113
+ } catch (error) {
114
+ done(error);
115
+ }
116
+ })
117
+ .catch((err) => {
118
+ done(err);
119
+ });
80
120
  });
81
121
 
82
122
  it('Support IPv6', (done) => {
83
- diagnostics.haveIPv6Async((result) => {
84
- try {
85
- assert.equal(result, true);
86
- done();
87
- } catch (error) {
88
- done(error);
89
- }
90
- });
123
+ const options = {
124
+ family: 6,
125
+ hints: dnsLookup.ADDRCONFIG
126
+ };
127
+
128
+ dnsLookup.lookup(host, options)
129
+ .then((address, family) => {
130
+ try {
131
+ assert.ok(address !== null && family === 6);
132
+ done();
133
+ } catch (error) {
134
+ done(error);
135
+ }
136
+ })
137
+ .catch((err) => {
138
+ done(err);
139
+ });
91
140
  });
92
141
  });
93
142
  });
@@ -3,13 +3,15 @@
3
3
  // Set globals
4
4
  /* global describe it log pronghornProps */
5
5
  /* eslint no-unused-vars: warn */
6
- /* eslint no-underscore-dangle: warn */
6
+ /* eslint no-underscore-dangle: warn */
7
+ /* eslint import/no-dynamic-require:warn */
7
8
 
8
9
  // include required items for testing & logging
9
10
  const assert = require('assert');
10
11
  const fs = require('fs');
11
- const mocha = require('mocha');
12
12
  const path = require('path');
13
+ const util = require('util');
14
+ const mocha = require('mocha');
13
15
  const winston = require('winston');
14
16
  const { expect } = require('chai');
15
17
  const { use } = require('chai');
@@ -19,20 +21,33 @@ const anything = td.matchers.anything();
19
21
 
20
22
  // stub and attemptTimeout are used throughout the code so set them here
21
23
  let logLevel = 'none';
22
- const stub = true;
23
24
  const isRapidFail = false;
24
25
  const isSaveMockData = false;
25
- const attemptTimeout = 5000;
26
+
27
+ // read in the properties from the sampleProperties files
28
+ let adaptdir = __dirname;
29
+ if (adaptdir.endsWith('/test/integration')) {
30
+ adaptdir = adaptdir.substring(0, adaptdir.length - 17);
31
+ } else if (adaptdir.endsWith('/test/unit')) {
32
+ adaptdir = adaptdir.substring(0, adaptdir.length - 10);
33
+ }
34
+ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
26
35
 
27
36
  // these variables can be changed to run in integrated mode so easier to set them here
28
37
  // always check these in with bogus data!!!
29
- const host = 'replace.hostorip.here';
30
- const username = 'username';
31
- const password = 'password';
32
- const protocol = 'http';
33
- const port = 80;
34
- const sslenable = false;
35
- const sslinvalid = false;
38
+ samProps.stub = true;
39
+ samProps.host = 'replace.hostorip.here';
40
+ samProps.authentication.username = 'username';
41
+ samProps.authentication.password = 'password';
42
+ samProps.protocol = 'http';
43
+ samProps.port = 80;
44
+ samProps.ssl.enabled = false;
45
+ samProps.ssl.accept_invalid_cert = false;
46
+ if (samProps.request.attempt_timeout < 30000) {
47
+ samProps.request.attempt_timeout = 30000;
48
+ }
49
+ const attemptTimeout = samProps.request.attempt_timeout;
50
+ const { stub } = samProps;
36
51
 
37
52
  // these are the adapter properties. You generally should not need to alter
38
53
  // any of these after they are initially set up
@@ -44,99 +59,7 @@ global.pronghornProps = {
44
59
  adapters: [{
45
60
  id: 'Test-okta',
46
61
  type: 'Okta',
47
- properties: {
48
- host,
49
- port,
50
- base_path: '/',
51
- version: '',
52
- cache_location: 'none',
53
- encode_pathvars: true,
54
- save_metric: false,
55
- stub,
56
- protocol,
57
- authentication: {
58
- auth_method: 'no_authentication',
59
- username,
60
- password,
61
- token: '',
62
- invalid_token_error: 401,
63
- token_timeout: -1,
64
- token_cache: 'local',
65
- auth_field: 'header.headers.Authorization',
66
- auth_field_format: 'Basic {b64}{username}:{password}{/b64}',
67
- auth_logging: false
68
- },
69
- healthcheck: {
70
- type: 'none',
71
- frequency: 60000,
72
- query_object: {}
73
- },
74
- throttle: {
75
- throttle_enabled: false,
76
- number_pronghorns: 1,
77
- sync_async: 'sync',
78
- max_in_queue: 1000,
79
- concurrent_max: 1,
80
- expire_timeout: 0,
81
- avg_runtime: 200,
82
- priorities: [
83
- {
84
- value: 0,
85
- percent: 100
86
- }
87
- ]
88
- },
89
- request: {
90
- number_redirects: 0,
91
- number_retries: 3,
92
- limit_retry_error: [0],
93
- failover_codes: [],
94
- attempt_timeout: attemptTimeout,
95
- global_request: {
96
- payload: {},
97
- uriOptions: {},
98
- addlHeaders: {},
99
- authData: {}
100
- },
101
- healthcheck_on_timeout: true,
102
- return_raw: true,
103
- archiving: false,
104
- return_request: false
105
- },
106
- proxy: {
107
- enabled: false,
108
- host: '',
109
- port: 1,
110
- protocol: 'http',
111
- username: '',
112
- password: ''
113
- },
114
- ssl: {
115
- ecdhCurve: '',
116
- enabled: sslenable,
117
- accept_invalid_cert: sslinvalid,
118
- ca_file: '',
119
- key_file: '',
120
- cert_file: '',
121
- secure_protocol: '',
122
- ciphers: ''
123
- },
124
- mongo: {
125
- host: '',
126
- port: 0,
127
- database: '',
128
- username: '',
129
- password: '',
130
- replSet: '',
131
- db_ssl: {
132
- enabled: false,
133
- accept_invalid_cert: false,
134
- ca_file: '',
135
- key_file: '',
136
- cert_file: ''
137
- }
138
- }
139
- }
62
+ properties: samProps
140
63
  }]
141
64
  }
142
65
  };
@@ -412,6 +335,134 @@ describe('[integration] Okta Adapter Test', () => {
412
335
  }).timeout(attemptTimeout);
413
336
  });
414
337
 
338
+ // broker tests
339
+ describe('#getDevicesFiltered - errors', () => {
340
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
341
+ try {
342
+ const opts = {
343
+ filter: {
344
+ name: 'deviceName'
345
+ }
346
+ };
347
+ a.getDevicesFiltered(opts, (data, error) => {
348
+ try {
349
+ if (stub) {
350
+ if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
351
+ assert.equal(null, error);
352
+ assert.notEqual(undefined, data);
353
+ assert.notEqual(null, data);
354
+ assert.equal(0, data.total);
355
+ assert.equal(0, data.list.length);
356
+ } else {
357
+ const displayE = 'Error 400 received on request';
358
+ runErrorAsserts(data, error, 'AD.500', 'Test-okta-connectorRest-handleEndResponse', displayE);
359
+ }
360
+ } else {
361
+ runCommonAsserts(data, error);
362
+ }
363
+ done();
364
+ } catch (err) {
365
+ log.error(`Test Failure: ${err}`);
366
+ done(err);
367
+ }
368
+ });
369
+ } catch (error) {
370
+ log.error(`Adapter Exception: ${error}`);
371
+ done(error);
372
+ }
373
+ }).timeout(attemptTimeout);
374
+ });
375
+
376
+ describe('#iapGetDeviceCount - errors', () => {
377
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
378
+ try {
379
+ const opts = {
380
+ filter: {
381
+ name: 'deviceName'
382
+ }
383
+ };
384
+ a.iapGetDeviceCount((data, error) => {
385
+ try {
386
+ if (stub) {
387
+ if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
388
+ assert.equal(null, error);
389
+ assert.notEqual(undefined, data);
390
+ assert.notEqual(null, data);
391
+ assert.equal(0, data.count);
392
+ } else {
393
+ const displayE = 'Error 400 received on request';
394
+ runErrorAsserts(data, error, 'AD.500', 'Test-okta-connectorRest-handleEndResponse', displayE);
395
+ }
396
+ } else {
397
+ runCommonAsserts(data, error);
398
+ }
399
+ done();
400
+ } catch (err) {
401
+ log.error(`Test Failure: ${err}`);
402
+ done(err);
403
+ }
404
+ });
405
+ } catch (error) {
406
+ log.error(`Adapter Exception: ${error}`);
407
+ done(error);
408
+ }
409
+ }).timeout(attemptTimeout);
410
+ });
411
+
412
+ // exposed cache tests
413
+ describe('#iapPopulateEntityCache - errors', () => {
414
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
415
+ try {
416
+ a.iapPopulateEntityCache('Device', (data, error) => {
417
+ try {
418
+ if (stub) {
419
+ assert.equal(null, data);
420
+ assert.notEqual(undefined, error);
421
+ assert.notEqual(null, error);
422
+ done();
423
+ } else {
424
+ assert.equal(undefined, error);
425
+ assert.equal('success', data[0]);
426
+ done();
427
+ }
428
+ } catch (err) {
429
+ log.error(`Test Failure: ${err}`);
430
+ done(err);
431
+ }
432
+ });
433
+ } catch (error) {
434
+ log.error(`Adapter Exception: ${error}`);
435
+ done(error);
436
+ }
437
+ }).timeout(attemptTimeout);
438
+ });
439
+
440
+ describe('#iapRetrieveEntitiesCache - errors', () => {
441
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
442
+ try {
443
+ a.iapRetrieveEntitiesCache('Device', {}, (data, error) => {
444
+ try {
445
+ if (stub) {
446
+ assert.equal(null, data);
447
+ assert.notEqual(null, error);
448
+ assert.notEqual(undefined, error);
449
+ } else {
450
+ assert.equal(undefined, error);
451
+ assert.notEqual(null, data);
452
+ assert.notEqual(undefined, data);
453
+ }
454
+ done();
455
+ } catch (err) {
456
+ log.error(`Test Failure: ${err}`);
457
+ done(err);
458
+ }
459
+ });
460
+ } catch (error) {
461
+ log.error(`Adapter Exception: ${error}`);
462
+ done(error);
463
+ }
464
+ }).timeout(attemptTimeout);
465
+ });
415
466
  /*
416
467
  -----------------------------------------------------------------------
417
468
  -----------------------------------------------------------------------