@itentialopensource/adapter-microsoft_graph 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 1.0.1 [08-23-2023]
3
+
4
+ * Update utils version to 5 and add oauth support
5
+
6
+ See merge request itentialopensource/adapters/cloud/adapter-microsoft_graph!2
7
+
8
+ ---
9
+
2
10
  ## 1.0.0 [11-14-2022]
3
11
 
4
12
  * Major/adapt 2409
@@ -6,4 +14,3 @@
6
14
  See merge request itentialopensource/adapters/cloud/adapter-microsoft_graph!1
7
15
 
8
16
  ---
9
-
@@ -9,7 +9,7 @@
9
9
  "responseSchema": "schemaTokenResp.json",
10
10
  "timeout": 0,
11
11
  "sendEmpty": false,
12
- "requestDatatype": "",
12
+ "requestDatatype": "URLENCODE",
13
13
  "responseDatatype": "",
14
14
  "headers": {},
15
15
  "sso": {
@@ -36,6 +36,39 @@
36
36
  },
37
37
  "external_name": "password"
38
38
  },
39
+ "client_id": {
40
+ "type": "string",
41
+ "description": "client id to log in with",
42
+ "parse": false,
43
+ "encode": false,
44
+ "encrypt": {
45
+ "type": "AES",
46
+ "key": ""
47
+ },
48
+ "external_name": "client_id"
49
+ },
50
+ "client_secret": {
51
+ "type": "string",
52
+ "description": "client secret to log in with",
53
+ "parse": false,
54
+ "encode": false,
55
+ "encrypt": {
56
+ "type": "AES",
57
+ "key": ""
58
+ },
59
+ "external_name": "client_secret"
60
+ },
61
+ "grant_type": {
62
+ "type": "string",
63
+ "description": "grant type to log in with",
64
+ "parse": false,
65
+ "encode": false,
66
+ "encrypt": {
67
+ "type": "AES",
68
+ "key": ""
69
+ },
70
+ "external_name": "grant_type"
71
+ },
39
72
  "token": {
40
73
  "type": "string",
41
74
  "description": "token returned by system",
@@ -46,7 +46,7 @@
46
46
  "type": "AES",
47
47
  "key": ""
48
48
  },
49
- "external_name": "token"
49
+ "external_name": "access_token"
50
50
  }
51
51
  },
52
52
  "definitions": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-microsoft_graph",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "This adapter integrates with system described as: microsoftGraph.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.15",
@@ -54,7 +54,7 @@
54
54
  "author": "Itential",
55
55
  "homepage": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-microsoft_graph#readme",
56
56
  "dependencies": {
57
- "@itentialopensource/adapter-utils": "^4.48.0",
57
+ "@itentialopensource/adapter-utils": "^5.0.1",
58
58
  "ajv": "^6.12.0",
59
59
  "axios": "^0.21.0",
60
60
  "commander": "^2.20.0",
Binary file
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "configLines": 10093,
4
+ "scriptLines": 1795,
5
+ "codeLines": 20587,
6
+ "testLines": 14653,
7
+ "testCases": 741,
8
+ "totalCodeLines": 37035,
9
+ "wfTasks": 219
10
+ }
@@ -13,19 +13,20 @@
13
13
  "stub": true,
14
14
  "protocol": "https",
15
15
  "authentication": {
16
- "auth_method": "basic user_password",
17
- "username": "username",
18
- "password": "password",
16
+ "auth_method": "request_token",
17
+ "username": "",
18
+ "password": "",
19
19
  "token": "token",
20
20
  "token_timeout": 600000,
21
21
  "token_cache": "local",
22
+ "token_URI_path": "/{tenant}/oauth2/v2.0/token",
22
23
  "invalid_token_error": 401,
23
- "auth_field": "header.headers.X-AUTH-TOKEN",
24
- "auth_field_format": "{token}",
24
+ "auth_field": "header.headers.Authorization",
25
+ "auth_field_format": "Bearer {token}",
25
26
  "auth_logging": false,
26
27
  "client_id": "",
27
28
  "client_secret": "",
28
- "grant_type": ""
29
+ "grant_type": "client_credentials"
29
30
  },
30
31
  "healthcheck": {
31
32
  "type": "none",
@@ -594,34 +594,6 @@ describe('[unit] Adapter Base Test', () => {
594
594
  ]
595
595
  };
596
596
  const key = 'name';
597
- describe('#addEntityCache', () => {
598
- it('should have a addEntityCache function', (done) => {
599
- try {
600
- assert.equal(true, typeof a.addEntityCache === 'function');
601
- done();
602
- } catch (error) {
603
- log.error(`Test Failure: ${error}`);
604
- done(error);
605
- }
606
- });
607
- it('should take the entities and add them to the cache', (done) => {
608
- // Run the promise and verify the results match what we were expecting.
609
- try {
610
- a.addEntityCache(entityType, entities, key, (data, error) => {
611
- try {
612
- assert.equal(true, data);
613
- done();
614
- } catch (err) {
615
- log.error(`Test Failure: ${err}`);
616
- done(err);
617
- }
618
- });
619
- } catch (error) {
620
- log.error(`Adapter Exception: ${error}`);
621
- done(error);
622
- }
623
- }).timeout(attemptTimeout);
624
- });
625
597
 
626
598
  const cache = [
627
599
  'Godric Gryffindor',