@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/CALLS.md +1213 -0
- package/CHANGELOG.md +8 -1
- package/entities/.system/action.json +1 -1
- package/entities/.system/schemaTokenReq.json +33 -0
- package/entities/.system/schemaTokenResp.json +1 -1
- package/package.json +2 -2
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/sampleProperties.json +7 -6
- package/test/unit/adapterBaseTestUnit.js +0 -28
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
|
-
|
@@ -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",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@itentialopensource/adapter-microsoft_graph",
|
3
|
-
"version": "1.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": "^
|
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
|
package/sampleProperties.json
CHANGED
@@ -13,19 +13,20 @@
|
|
13
13
|
"stub": true,
|
14
14
|
"protocol": "https",
|
15
15
|
"authentication": {
|
16
|
-
"auth_method": "
|
17
|
-
"username": "
|
18
|
-
"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.
|
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',
|