@rockcarver/frodo-lib 0.17.2-0 → 0.17.3
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/CHANGELOG.md +9 -1
- package/cjs/api/AgentApi.js +1 -1
- package/cjs/api/AgentApi.js.map +1 -1
- package/cjs/api/AgentApi.test.js.map +1 -1
- package/cjs/api/ApiTypes.js +16 -16
- package/cjs/api/ApiTypes.js.map +1 -1
- package/cjs/api/AuthenticateApi.js +17 -12
- package/cjs/api/AuthenticateApi.js.map +1 -1
- package/cjs/api/AuthenticateApi.test.js.map +1 -1
- package/cjs/api/IdmConfigApi.js +28 -7
- package/cjs/api/IdmConfigApi.js.map +1 -1
- package/cjs/api/NodeApi.test.js.map +1 -1
- package/cjs/api/SecretsApi.test.js.map +1 -1
- package/cjs/api/SocialIdentityProvidersApi.js +22 -0
- package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
- package/cjs/api/TreeApi.test.js.map +1 -1
- package/cjs/api/VariablesApi.test.js.map +1 -1
- package/cjs/api/utils/ApiUtils.js +13 -4
- package/cjs/api/utils/ApiUtils.js.map +1 -1
- package/cjs/api/utils/ApiUtils.test.js.map +1 -1
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/cjs/ops/AgentOps.test.js.map +1 -1
- package/cjs/ops/AuthenticateOps.js +0 -7
- package/cjs/ops/AuthenticateOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
- package/cjs/ops/IdmOps.test.js.map +1 -1
- package/cjs/ops/IdpOps.js +182 -275
- package/cjs/ops/IdpOps.js.map +1 -1
- package/cjs/ops/IdpOps.test.js.map +1 -1
- package/cjs/ops/SecretsOps.js +3 -3
- package/cjs/ops/SecretsOps.js.map +1 -1
- package/cjs/ops/VariablesOps.js +3 -3
- package/cjs/ops/VariablesOps.js.map +1 -1
- package/cjs/shared/State.js +1 -1
- package/cjs/shared/State.js.map +1 -1
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ig_mytestrun_com.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent1.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{ig_chico.json → FrodoOpsTestGatewayAgent2.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ig_chico.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent3.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{ig_mytestrun_com.json → FrodoOpsTestGatewayAgent4.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/api_client.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent5.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{api_client.json → FrodoOpsTestGatewayAgent6.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent7.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent8.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent9.json +30 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent1.json +30 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent2.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent3.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/{javaAgent.json → FrodoOpsTestJavaAgent1.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/{tomcatagent.json → FrodoOpsTestJavaAgent2.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/tomcatagent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent3.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/javaAgent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent4.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent5.json +621 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent6.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent7.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent8.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent9.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent1.json +621 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent2.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent3.json +628 -0
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/apacheagent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent1.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/webserver.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent2.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/{webserver.json → FrodoOpsTestWebAgent3.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/{apacheagent.json → FrodoOpsTestWebAgent4.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent5.json +454 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent6.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent7.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent8.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent9.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent1.json +454 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent2.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent3.json +453 -0
- package/cjs/test/mocks/ForgeRockApiMockEngine.js +1 -108
- package/cjs/test/mocks/ForgeRockApiMockEngine.js.map +1 -1
- package/esm/api/AgentApi.mjs +1 -1
- package/esm/api/AgentApi.test.mjs +323 -246
- package/esm/api/ApiTypes.mjs +16 -16
- package/esm/api/AuthenticateApi.mjs +16 -12
- package/esm/api/AuthenticateApi.test.mjs +77 -35
- package/esm/api/IdmConfigApi.mjs +19 -4
- package/esm/api/NodeApi.test.mjs +248 -914
- package/esm/api/SecretsApi.test.mjs +252 -245
- package/esm/api/SocialIdentityProvidersApi.mjs +16 -0
- package/esm/api/TreeApi.test.mjs +190 -105
- package/esm/api/VariablesApi.test.mjs +108 -12
- package/esm/api/utils/ApiUtils.mjs +12 -4
- package/esm/api/utils/ApiUtils.test.mjs +80 -79
- package/esm/index.mjs +1 -0
- package/esm/ops/AgentOps.test.mjs +780 -1210
- package/esm/ops/AuthenticateOps.mjs +0 -7
- package/esm/ops/ConnectionProfileOps.test.mjs +94 -54
- package/esm/ops/EmailTemplateOps.test.mjs +140 -28
- package/esm/ops/IdmOps.test.mjs +159 -62
- package/esm/ops/IdpOps.mjs +139 -210
- package/esm/ops/IdpOps.test.mjs +651 -52
- package/esm/ops/SecretsOps.mjs +3 -3
- package/esm/ops/VariablesOps.mjs +3 -3
- package/esm/shared/State.mjs +1 -1
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent1.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent2.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent3.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent4.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent5.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent6.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent7.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent8.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent9.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent1.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent2.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent3.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent1.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent2.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent3.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent4.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent5.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent6.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent7.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent8.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent9.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent1.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent2.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent3.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent1.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent2.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent3.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent4.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent5.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent6.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent7.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent8.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent9.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent1.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent2.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent3.json +453 -0
- package/esm/test/mocks/ForgeRockApiMockEngine.mjs +1 -98
- package/package.json +1 -1
- package/types/api/AgentApi.d.ts.map +1 -1
- package/types/api/ApiTypes.d.ts +21 -21
- package/types/api/ApiTypes.d.ts.map +1 -1
- package/types/api/AuthenticateApi.d.ts +11 -2
- package/types/api/AuthenticateApi.d.ts.map +1 -1
- package/types/api/IdmConfigApi.d.ts +11 -5
- package/types/api/IdmConfigApi.d.ts.map +1 -1
- package/types/api/SocialIdentityProvidersApi.d.ts +7 -0
- package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
- package/types/api/utils/ApiUtils.d.ts +7 -1
- package/types/api/utils/ApiUtils.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/ops/AuthenticateOps.d.ts.map +1 -1
- package/types/ops/IdpOps.d.ts +31 -24
- package/types/ops/IdpOps.d.ts.map +1 -1
- package/types/ops/SecretsOps.d.ts.map +1 -1
- package/types/ops/VariablesOps.d.ts.map +1 -1
- package/types/shared/State.d.ts.map +1 -1
- package/types/test/mocks/ForgeRockApiMockEngine.d.ts +1 -11
- package/types/test/mocks/ForgeRockApiMockEngine.d.ts.map +1 -1
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ajays_client.json +0 -22
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ajays_client.json +0 -22
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
{
|
|
2
|
+
"miscWebAgentConfig": {
|
|
3
|
+
"anonymousUserId": {
|
|
4
|
+
"inherited": false,
|
|
5
|
+
"value": "anonymous"
|
|
6
|
+
},
|
|
7
|
+
"profileAttributesCookieMaxAge": {
|
|
8
|
+
"inherited": false,
|
|
9
|
+
"value": 300
|
|
10
|
+
},
|
|
11
|
+
"urlJsonResponse": {
|
|
12
|
+
"inherited": false,
|
|
13
|
+
"value": [""]
|
|
14
|
+
},
|
|
15
|
+
"caseInsensitiveUrlComparison": {
|
|
16
|
+
"inherited": false,
|
|
17
|
+
"value": true
|
|
18
|
+
},
|
|
19
|
+
"compositeAdviceRedirect": {
|
|
20
|
+
"inherited": false,
|
|
21
|
+
"value": false
|
|
22
|
+
},
|
|
23
|
+
"compositeAdviceEncode": {
|
|
24
|
+
"inherited": false,
|
|
25
|
+
"value": false
|
|
26
|
+
},
|
|
27
|
+
"addCacheControlHeader": {
|
|
28
|
+
"inherited": false,
|
|
29
|
+
"value": false
|
|
30
|
+
},
|
|
31
|
+
"anonymousUserEnabled": {
|
|
32
|
+
"inherited": false,
|
|
33
|
+
"value": false
|
|
34
|
+
},
|
|
35
|
+
"invalidUrlRegex": {
|
|
36
|
+
"inherited": false
|
|
37
|
+
},
|
|
38
|
+
"ignorePathInfo": {
|
|
39
|
+
"inherited": false,
|
|
40
|
+
"value": false
|
|
41
|
+
},
|
|
42
|
+
"invertUrlJsonResponse": {
|
|
43
|
+
"inherited": false,
|
|
44
|
+
"value": false
|
|
45
|
+
},
|
|
46
|
+
"statusCodeJsonResponse": {
|
|
47
|
+
"inherited": false,
|
|
48
|
+
"value": 202
|
|
49
|
+
},
|
|
50
|
+
"headerJsonResponse": {
|
|
51
|
+
"inherited": false,
|
|
52
|
+
"value": {}
|
|
53
|
+
},
|
|
54
|
+
"encodeSpecialCharsInCookies": {
|
|
55
|
+
"inherited": false,
|
|
56
|
+
"value": false
|
|
57
|
+
},
|
|
58
|
+
"gotoParameterName": {
|
|
59
|
+
"inherited": false,
|
|
60
|
+
"value": "goto"
|
|
61
|
+
},
|
|
62
|
+
"encodeUrlSpecialCharacters": {
|
|
63
|
+
"inherited": false,
|
|
64
|
+
"value": false
|
|
65
|
+
},
|
|
66
|
+
"mineEncodeHeader": {
|
|
67
|
+
"inherited": false,
|
|
68
|
+
"value": 0
|
|
69
|
+
},
|
|
70
|
+
"profileAttributesCookiePrefix": {
|
|
71
|
+
"inherited": false,
|
|
72
|
+
"value": "HTTP_"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"advancedWebAgentConfig": {
|
|
76
|
+
"overrideRequestHost": {
|
|
77
|
+
"inherited": false,
|
|
78
|
+
"value": false
|
|
79
|
+
},
|
|
80
|
+
"pdpSkipPostUrl": {
|
|
81
|
+
"inherited": false,
|
|
82
|
+
"value": [""]
|
|
83
|
+
},
|
|
84
|
+
"pdpStickySessionValue": {
|
|
85
|
+
"inherited": false
|
|
86
|
+
},
|
|
87
|
+
"postDataPreservation": {
|
|
88
|
+
"inherited": false,
|
|
89
|
+
"value": false
|
|
90
|
+
},
|
|
91
|
+
"hostnameToIpAddress": {
|
|
92
|
+
"inherited": false,
|
|
93
|
+
"value": []
|
|
94
|
+
},
|
|
95
|
+
"showPasswordInHeader": {
|
|
96
|
+
"inherited": false,
|
|
97
|
+
"value": false
|
|
98
|
+
},
|
|
99
|
+
"overrideRequestProtocol": {
|
|
100
|
+
"inherited": false,
|
|
101
|
+
"value": false
|
|
102
|
+
},
|
|
103
|
+
"clientIpHeader": {
|
|
104
|
+
"inherited": false
|
|
105
|
+
},
|
|
106
|
+
"replayPasswordKey": {
|
|
107
|
+
"inherited": false
|
|
108
|
+
},
|
|
109
|
+
"customProperties": {
|
|
110
|
+
"inherited": false,
|
|
111
|
+
"value": []
|
|
112
|
+
},
|
|
113
|
+
"postDataCachePeriod": {
|
|
114
|
+
"inherited": false,
|
|
115
|
+
"value": 10
|
|
116
|
+
},
|
|
117
|
+
"retainSessionCache": {
|
|
118
|
+
"inherited": false,
|
|
119
|
+
"value": false
|
|
120
|
+
},
|
|
121
|
+
"pdpJavascriptRepost": {
|
|
122
|
+
"inherited": false,
|
|
123
|
+
"value": false
|
|
124
|
+
},
|
|
125
|
+
"pdpStickySessionMode": {
|
|
126
|
+
"inherited": false,
|
|
127
|
+
"value": "OFF"
|
|
128
|
+
},
|
|
129
|
+
"overrideRequestPort": {
|
|
130
|
+
"inherited": false,
|
|
131
|
+
"value": false
|
|
132
|
+
},
|
|
133
|
+
"apacheAuthDirectives": {
|
|
134
|
+
"inherited": false
|
|
135
|
+
},
|
|
136
|
+
"clientHostnameHeader": {
|
|
137
|
+
"inherited": false
|
|
138
|
+
},
|
|
139
|
+
"fragmentRedirectEnabled": {
|
|
140
|
+
"inherited": false,
|
|
141
|
+
"value": false
|
|
142
|
+
},
|
|
143
|
+
"pdpStickySessionCookieName": {
|
|
144
|
+
"inherited": false
|
|
145
|
+
},
|
|
146
|
+
"logonAndImpersonation": {
|
|
147
|
+
"inherited": false,
|
|
148
|
+
"value": false
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"ssoWebAgentConfig": {
|
|
152
|
+
"cookieResetList": {
|
|
153
|
+
"inherited": false,
|
|
154
|
+
"value": [""]
|
|
155
|
+
},
|
|
156
|
+
"cdssoRedirectUri": {
|
|
157
|
+
"inherited": false,
|
|
158
|
+
"value": "agent/cdsso-oauth2"
|
|
159
|
+
},
|
|
160
|
+
"persistentJwtCookie": {
|
|
161
|
+
"inherited": false,
|
|
162
|
+
"value": false
|
|
163
|
+
},
|
|
164
|
+
"secureCookies": {
|
|
165
|
+
"inherited": false,
|
|
166
|
+
"value": false
|
|
167
|
+
},
|
|
168
|
+
"acceptSsoToken": {
|
|
169
|
+
"inherited": false,
|
|
170
|
+
"value": false
|
|
171
|
+
},
|
|
172
|
+
"cookieResetOnRedirect": {
|
|
173
|
+
"inherited": false,
|
|
174
|
+
"value": false
|
|
175
|
+
},
|
|
176
|
+
"sameSite": {
|
|
177
|
+
"inherited": false
|
|
178
|
+
},
|
|
179
|
+
"cdssoCookieDomain": {
|
|
180
|
+
"inherited": false,
|
|
181
|
+
"value": [""]
|
|
182
|
+
},
|
|
183
|
+
"cookieResetEnabled": {
|
|
184
|
+
"inherited": false,
|
|
185
|
+
"value": false
|
|
186
|
+
},
|
|
187
|
+
"cookieName": {
|
|
188
|
+
"inherited": false,
|
|
189
|
+
"value": "iPlanetDirectoryPro"
|
|
190
|
+
},
|
|
191
|
+
"multivaluePreAuthnCookie": {
|
|
192
|
+
"inherited": false,
|
|
193
|
+
"value": false
|
|
194
|
+
},
|
|
195
|
+
"httpOnly": {
|
|
196
|
+
"inherited": false,
|
|
197
|
+
"value": true
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"amServicesWebAgent": {
|
|
201
|
+
"policyClockSkew": {
|
|
202
|
+
"inherited": false,
|
|
203
|
+
"value": 0
|
|
204
|
+
},
|
|
205
|
+
"enableLogoutRegex": {
|
|
206
|
+
"inherited": false,
|
|
207
|
+
"value": false
|
|
208
|
+
},
|
|
209
|
+
"policyEvaluationRealm": {
|
|
210
|
+
"inherited": false,
|
|
211
|
+
"value": "/alpha"
|
|
212
|
+
},
|
|
213
|
+
"fetchPoliciesFromRootResource": {
|
|
214
|
+
"inherited": false,
|
|
215
|
+
"value": false
|
|
216
|
+
},
|
|
217
|
+
"logoutUrlRegex": {
|
|
218
|
+
"inherited": false
|
|
219
|
+
},
|
|
220
|
+
"conditionalLoginUrl": {
|
|
221
|
+
"inherited": false,
|
|
222
|
+
"value": [
|
|
223
|
+
"|https://openam-volker-dev.forgeblocks.com:443/am/oauth2/authorize?realm=/alpha"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"customLoginMode": {
|
|
227
|
+
"inherited": false,
|
|
228
|
+
"value": 0
|
|
229
|
+
},
|
|
230
|
+
"invalidateLogoutSession": {
|
|
231
|
+
"inherited": false,
|
|
232
|
+
"value": true
|
|
233
|
+
},
|
|
234
|
+
"logoutResetCookies": {
|
|
235
|
+
"inherited": false,
|
|
236
|
+
"value": [""]
|
|
237
|
+
},
|
|
238
|
+
"logoutRedirectUrl": {
|
|
239
|
+
"inherited": false
|
|
240
|
+
},
|
|
241
|
+
"regexConditionalLoginUrl": {
|
|
242
|
+
"inherited": false,
|
|
243
|
+
"value": [""]
|
|
244
|
+
},
|
|
245
|
+
"policyCachePollingInterval": {
|
|
246
|
+
"inherited": false,
|
|
247
|
+
"value": 3
|
|
248
|
+
},
|
|
249
|
+
"regexConditionalLoginPattern": {
|
|
250
|
+
"inherited": false,
|
|
251
|
+
"value": [""]
|
|
252
|
+
},
|
|
253
|
+
"logoutRedirectDisabled": {
|
|
254
|
+
"inherited": false,
|
|
255
|
+
"value": false
|
|
256
|
+
},
|
|
257
|
+
"retrieveClientHostname": {
|
|
258
|
+
"inherited": false,
|
|
259
|
+
"value": false
|
|
260
|
+
},
|
|
261
|
+
"applicationLogoutUrls": {
|
|
262
|
+
"inherited": false,
|
|
263
|
+
"value": [""]
|
|
264
|
+
},
|
|
265
|
+
"userIdParameterType": {
|
|
266
|
+
"inherited": false,
|
|
267
|
+
"value": "session"
|
|
268
|
+
},
|
|
269
|
+
"publicAmUrl": {
|
|
270
|
+
"inherited": false
|
|
271
|
+
},
|
|
272
|
+
"userIdParameter": {
|
|
273
|
+
"inherited": false,
|
|
274
|
+
"value": "UserToken"
|
|
275
|
+
},
|
|
276
|
+
"amLoginUrl": {
|
|
277
|
+
"inherited": false,
|
|
278
|
+
"value": []
|
|
279
|
+
},
|
|
280
|
+
"policyEvaluationApplication": {
|
|
281
|
+
"inherited": false
|
|
282
|
+
},
|
|
283
|
+
"amLogoutUrl": {
|
|
284
|
+
"inherited": false,
|
|
285
|
+
"value": ["https://openam-volker-dev.forgeblocks.com:443/am/UI/Logout"]
|
|
286
|
+
},
|
|
287
|
+
"ssoCachePollingInterval": {
|
|
288
|
+
"inherited": false,
|
|
289
|
+
"value": 3
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"applicationWebAgentConfig": {
|
|
293
|
+
"profileAttributeFetchMode": {
|
|
294
|
+
"inherited": false,
|
|
295
|
+
"value": "NONE"
|
|
296
|
+
},
|
|
297
|
+
"clientIpValidation": {
|
|
298
|
+
"inherited": false,
|
|
299
|
+
"value": false
|
|
300
|
+
},
|
|
301
|
+
"notEnforcedIpsRegex": {
|
|
302
|
+
"inherited": false,
|
|
303
|
+
"value": false
|
|
304
|
+
},
|
|
305
|
+
"continuousSecurityCookies": {
|
|
306
|
+
"inherited": false,
|
|
307
|
+
"value": {}
|
|
308
|
+
},
|
|
309
|
+
"fetchAttributesForNotEnforcedUrls": {
|
|
310
|
+
"inherited": false,
|
|
311
|
+
"value": false
|
|
312
|
+
},
|
|
313
|
+
"ignorePathInfoForNotEnforcedUrls": {
|
|
314
|
+
"inherited": false,
|
|
315
|
+
"value": true
|
|
316
|
+
},
|
|
317
|
+
"responseAttributeFetchMode": {
|
|
318
|
+
"inherited": false,
|
|
319
|
+
"value": "NONE"
|
|
320
|
+
},
|
|
321
|
+
"attributeMultiValueSeparator": {
|
|
322
|
+
"inherited": false,
|
|
323
|
+
"value": "|"
|
|
324
|
+
},
|
|
325
|
+
"profileAttributeMap": {
|
|
326
|
+
"inherited": false,
|
|
327
|
+
"value": {}
|
|
328
|
+
},
|
|
329
|
+
"sessionAttributeFetchMode": {
|
|
330
|
+
"inherited": false,
|
|
331
|
+
"value": "NONE"
|
|
332
|
+
},
|
|
333
|
+
"continuousSecurityHeaders": {
|
|
334
|
+
"inherited": false,
|
|
335
|
+
"value": {}
|
|
336
|
+
},
|
|
337
|
+
"notEnforcedIpsList": {
|
|
338
|
+
"inherited": false,
|
|
339
|
+
"value": [""]
|
|
340
|
+
},
|
|
341
|
+
"responseAttributeMap": {
|
|
342
|
+
"inherited": false,
|
|
343
|
+
"value": {}
|
|
344
|
+
},
|
|
345
|
+
"notEnforcedUrls": {
|
|
346
|
+
"inherited": false,
|
|
347
|
+
"value": [""]
|
|
348
|
+
},
|
|
349
|
+
"sessionAttributeMap": {
|
|
350
|
+
"inherited": false,
|
|
351
|
+
"value": {}
|
|
352
|
+
},
|
|
353
|
+
"notEnforcedUrlsRegex": {
|
|
354
|
+
"inherited": false,
|
|
355
|
+
"value": false
|
|
356
|
+
},
|
|
357
|
+
"invertNotEnforcedUrls": {
|
|
358
|
+
"inherited": false,
|
|
359
|
+
"value": false
|
|
360
|
+
},
|
|
361
|
+
"notEnforcedIps": {
|
|
362
|
+
"inherited": false,
|
|
363
|
+
"value": [""]
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"globalWebAgentConfig": {
|
|
367
|
+
"userpassword": null,
|
|
368
|
+
"repositoryLocation": "centralized",
|
|
369
|
+
"agentDebugLevel": {
|
|
370
|
+
"inherited": false,
|
|
371
|
+
"value": "Error"
|
|
372
|
+
},
|
|
373
|
+
"fqdnDefault": {
|
|
374
|
+
"inherited": false,
|
|
375
|
+
"value": "www.mytestrun.com"
|
|
376
|
+
},
|
|
377
|
+
"webSocketConnectionIntervalInMinutes": {
|
|
378
|
+
"inherited": false,
|
|
379
|
+
"value": 30
|
|
380
|
+
},
|
|
381
|
+
"status": {
|
|
382
|
+
"inherited": false,
|
|
383
|
+
"value": "Active"
|
|
384
|
+
},
|
|
385
|
+
"configurationPollingInterval": {
|
|
386
|
+
"inherited": false,
|
|
387
|
+
"value": 60
|
|
388
|
+
},
|
|
389
|
+
"auditLogLocation": {
|
|
390
|
+
"inherited": false,
|
|
391
|
+
"value": "REMOTE"
|
|
392
|
+
},
|
|
393
|
+
"fqdnCheck": {
|
|
394
|
+
"inherited": false,
|
|
395
|
+
"value": false
|
|
396
|
+
},
|
|
397
|
+
"amLbCookieEnable": {
|
|
398
|
+
"inherited": false,
|
|
399
|
+
"value": false
|
|
400
|
+
},
|
|
401
|
+
"fqdnMapping": {
|
|
402
|
+
"inherited": false,
|
|
403
|
+
"value": {}
|
|
404
|
+
},
|
|
405
|
+
"accessDeniedUrl": {
|
|
406
|
+
"inherited": false
|
|
407
|
+
},
|
|
408
|
+
"resetIdleTime": {
|
|
409
|
+
"inherited": false,
|
|
410
|
+
"value": false
|
|
411
|
+
},
|
|
412
|
+
"ssoOnlyMode": {
|
|
413
|
+
"inherited": false,
|
|
414
|
+
"value": false
|
|
415
|
+
},
|
|
416
|
+
"auditAccessType": {
|
|
417
|
+
"inherited": false,
|
|
418
|
+
"value": "LOG_NONE"
|
|
419
|
+
},
|
|
420
|
+
"notificationsEnabled": {
|
|
421
|
+
"inherited": false,
|
|
422
|
+
"value": true
|
|
423
|
+
},
|
|
424
|
+
"agentUriPrefix": {
|
|
425
|
+
"inherited": false,
|
|
426
|
+
"value": "https://www.mytestrun.com:443/amagent"
|
|
427
|
+
},
|
|
428
|
+
"disableJwtAudit": {
|
|
429
|
+
"inherited": false,
|
|
430
|
+
"value": false
|
|
431
|
+
},
|
|
432
|
+
"jwtName": {
|
|
433
|
+
"inherited": false,
|
|
434
|
+
"value": "am-auth-jwt"
|
|
435
|
+
},
|
|
436
|
+
"cdssoRootUrl": {
|
|
437
|
+
"inherited": false,
|
|
438
|
+
"value": ["agentRootURL=https://www.mytestrun.com:443/"]
|
|
439
|
+
},
|
|
440
|
+
"agentConfigChangeNotificationsEnabled": {
|
|
441
|
+
"inherited": false,
|
|
442
|
+
"value": true
|
|
443
|
+
},
|
|
444
|
+
"jwtAuditWhitelist": {
|
|
445
|
+
"inherited": false
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"_type": {
|
|
449
|
+
"_id": "WebAgent",
|
|
450
|
+
"name": "Web Agents",
|
|
451
|
+
"collection": true
|
|
452
|
+
}
|
|
453
|
+
}
|
|
@@ -366,110 +366,13 @@ export function mockPutSocialProviderByTypeAndId(mock, callback) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/**
|
|
369
|
-
* Agent
|
|
369
|
+
* Agent test utils
|
|
370
370
|
*/
|
|
371
371
|
|
|
372
|
-
export function getAgentTypes() {
|
|
373
|
-
const objects = JSON.parse(fs.readFileSync(path.resolve(__dirname, './AgentApi/getAgentTypes/agentTypes.json'), 'utf8'));
|
|
374
|
-
return objects;
|
|
375
|
-
}
|
|
376
|
-
export function getAgents() {
|
|
377
|
-
const objects = JSON.parse(fs.readFileSync(path.resolve(__dirname, './AgentApi/getAgents/agents.json'), 'utf8'));
|
|
378
|
-
return objects;
|
|
379
|
-
}
|
|
380
372
|
export function getAgent(agentType, agentId) {
|
|
381
373
|
const objects = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/getAgentByTypeAndId/${agentType}/${agentId}.json`), 'utf8'));
|
|
382
374
|
return objects;
|
|
383
375
|
}
|
|
384
|
-
export function mockGetAgentTypes(mock) {
|
|
385
|
-
mock.onGet(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\?_action=getAllTypes/).reply(function () {
|
|
386
|
-
const mockStatus = 200;
|
|
387
|
-
const mockResponse = getAgentTypes();
|
|
388
|
-
if (typeof expect !== 'undefined') expect(mockResponse).toBeTruthy();
|
|
389
|
-
return [mockStatus, mockResponse];
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
export function mockGetAgentsByType(mock) {
|
|
393
|
-
mock.onGet(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\/.+?\?_queryFilter=true/).reply(function (config) {
|
|
394
|
-
const parsed = parseUrl(config.url);
|
|
395
|
-
const elements = parsed.pathname ? parsed.pathname.split('/') : [];
|
|
396
|
-
const agentType = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 1];
|
|
397
|
-
const mockStatus = 200;
|
|
398
|
-
const mockResponse = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/getAgentsByType/${agentType}s.json`), 'utf8'));
|
|
399
|
-
if (typeof expect !== 'undefined') expect(mockResponse).toBeTruthy();
|
|
400
|
-
return [mockStatus, mockResponse];
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
export function mockGetAgents(mock) {
|
|
404
|
-
mock.onPost(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\?_action=nextdescendents/).reply(function () {
|
|
405
|
-
const mockStatus = 200;
|
|
406
|
-
const mockResponse = getAgents();
|
|
407
|
-
if (typeof expect !== 'undefined') expect(mockResponse).toBeTruthy();
|
|
408
|
-
return [mockStatus, mockResponse];
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
export function mockFindAgentById(mock) {
|
|
412
|
-
mock.onGet(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\?_queryFilter=_id\+eq\+'.+?'/).reply(function (config) {
|
|
413
|
-
const parsed = parseUrl(config.url);
|
|
414
|
-
const filter = parsed.searchParam['_queryFilter'];
|
|
415
|
-
const agentId = filter.match(/_id\+eq\+'(.+?)'/)[1];
|
|
416
|
-
const mockStatus = 200;
|
|
417
|
-
const mockResponse = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/findAgentById/${agentId}.json`), 'utf8'));
|
|
418
|
-
if (typeof expect !== 'undefined') expect(mockResponse.result[0]._id).toBe(agentId);
|
|
419
|
-
return [mockStatus, mockResponse];
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
export function mockFindAgentByTypeAndId(mock) {
|
|
423
|
-
mock.onGet(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\/.+?\?_queryFilter=_id\+eq\+'.+?'/).reply(function (config) {
|
|
424
|
-
const parsed = parseUrl(config.url);
|
|
425
|
-
const elements = parsed.pathname ? parsed.pathname.split('/') : [];
|
|
426
|
-
const agentType = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 1];
|
|
427
|
-
const filter = parsed.searchParam['_queryFilter'];
|
|
428
|
-
const agentId = filter.match(/_id\+eq\+'(.+?)'/)[1];
|
|
429
|
-
const mockStatus = 200;
|
|
430
|
-
let mockResponse = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/findAgentByTypeAndId/not_found.json`), 'utf8'));
|
|
431
|
-
try {
|
|
432
|
-
mockResponse = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/findAgentByTypeAndId/${agentType}/${agentId}.json`), 'utf8'));
|
|
433
|
-
if (typeof expect !== 'undefined') expect(mockResponse.result[0]._id).toBe(agentId);
|
|
434
|
-
} catch (error) {
|
|
435
|
-
// ignore errors
|
|
436
|
-
}
|
|
437
|
-
return [mockStatus, mockResponse];
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
export function mockGetAgentByTypeAndId(mock) {
|
|
441
|
-
mock.onGet(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\/[a-zA-Z0-9/_-]+$/).reply(function (config) {
|
|
442
|
-
const elements = config.url ? config.url.split('/') : [];
|
|
443
|
-
const agentType = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 2];
|
|
444
|
-
const agentId = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 1];
|
|
445
|
-
const mockStatus = 200;
|
|
446
|
-
const mockResponse = JSON.parse(fs.readFileSync(path.resolve(__dirname, `./AgentApi/getAgentByTypeAndId/${agentType}/${agentId}.json`), 'utf8'));
|
|
447
|
-
if (typeof expect !== 'undefined') expect(mockResponse._id).toBe(agentId);
|
|
448
|
-
return [mockStatus, mockResponse];
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
export function mockPutAgentByTypeAndId(mock, callback) {
|
|
452
|
-
mock.onPut(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\/.+/).reply(function (config) {
|
|
453
|
-
const elements = config.url ? config.url.split('/') : [];
|
|
454
|
-
const agentType = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 2];
|
|
455
|
-
const agentId = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 1];
|
|
456
|
-
const mockStatus = 200;
|
|
457
|
-
const mockAgentObj = JSON.parse(config.data);
|
|
458
|
-
callback(agentType, agentId, mockAgentObj);
|
|
459
|
-
return [mockStatus, mockAgentObj];
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
export function mockDeleteAgentByTypeAndId(mock, callback) {
|
|
463
|
-
mock.onDelete(/\/json\/realms\/root\/realms\/alpha\/realm-config\/agents\/.+/).reply(function (config) {
|
|
464
|
-
const elements = config.url ? config.url.split('/') : [];
|
|
465
|
-
const agentType = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 2];
|
|
466
|
-
const agentId = elements[(elements === null || elements === void 0 ? void 0 : elements.length) - 1];
|
|
467
|
-
const mockStatus = 200;
|
|
468
|
-
const mockAgentObj = getAgent(agentType, agentId);
|
|
469
|
-
callback(agentType, agentId, mockAgentObj);
|
|
470
|
-
return [mockStatus, mockAgentObj];
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
376
|
|
|
474
377
|
/****
|
|
475
378
|
**
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/AgentApi.ts"],"names":[],"mappings":"AA0BA;;;GAGG;AACH,wBAAsB,aAAa,
|
|
1
|
+
{"version":3,"sources":["../src/api/AgentApi.ts"],"names":[],"mappings":"AA0BA;;;GAGG;AACH,wBAAsB,aAAa,iBAgBlC;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,gBAatD;AAED;;;GAGG;AACH,wBAAsB,SAAS,iBAgB9B;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,gBAalD;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAc5E;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAc3E;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,KAAA,gBAoBV;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,gBAehB","file":"AgentApi.d.ts","sourcesContent":["import util from 'util';\nimport { generateAmApi } from './BaseApi';\nimport { deleteDeepByKey, getCurrentRealmPath } from './utils/ApiUtils';\nimport * as state from '../shared/State';\nimport { debugMessage } from '../ops/utils/Console';\n\nconst getAgentTypesURLTemplate =\n '%s/json%s/realm-config/agents?_action=getAllTypes';\nconst getAllAgentsURLTemplate =\n '%s/json%s/realm-config/agents?_action=nextdescendents';\nconst queryAgentURLTemplate =\n \"%s/json%s/realm-config/agents?_queryFilter=_id+eq+'%s'\";\nconst queryAgentByTypeURLTemplate =\n \"%s/json%s/realm-config/agents/%s?_queryFilter=_id+eq+'%s'\";\nconst agentURLTemplate = '%s/json%s/realm-config/agents/%s/%s';\nconst agentListURLTemplate =\n '%s/json%s/realm-config/agents/%s?_queryFilter=true';\nconst apiVersion = 'protocol=2.1,resource=1.0';\nconst getApiConfig = () => {\n const configPath = getCurrentRealmPath();\n return {\n path: `${configPath}/realm-config/agents`,\n apiVersion,\n };\n};\n\n/**\n * Get agent types\n * @returns {Promise} a promise that resolves to an object containing an array of agent types\n */\nexport async function getAgentTypes() {\n debugMessage(`AgentApi.getAgentTypes: start`);\n const urlString = util.format(\n getAgentTypesURLTemplate,\n state.getHost(),\n getCurrentRealmPath()\n );\n const { data } = await generateAmApi(getApiConfig()).post(\n urlString,\n {},\n {\n withCredentials: true,\n }\n );\n debugMessage(`AgentApi.getAgentTypes: end`);\n return data;\n}\n\n/**\n * Get agents\n * @param {string} agentType agent type (IdentityGatewayAgent, J2EEAgent, WebAgent)\n * @returns {Promise} a promise that resolves to an object containing an array of agent objects of the specified type\n */\nexport async function getAgentsByType(agentType: string) {\n debugMessage(`AgentApi.getAgentsByType: start`);\n const urlString = util.format(\n agentListURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentType\n );\n const { data } = await generateAmApi(getApiConfig()).get(urlString, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.getAgentsByType: end`);\n return data;\n}\n\n/**\n * Get all agents\n * @returns {Promise} a promise that resolves to an object containing an array of agent objects\n */\nexport async function getAgents() {\n debugMessage(`AgentApi.getAgents: start`);\n const urlString = util.format(\n getAllAgentsURLTemplate,\n state.getHost(),\n getCurrentRealmPath()\n );\n const { data } = await generateAmApi(getApiConfig()).post(\n urlString,\n {},\n {\n withCredentials: true,\n }\n );\n debugMessage(`AgentApi.getAgents: end`);\n return data;\n}\n\n/**\n * Find agent by id\n * @param {string} agentId agent id\n * @returns {Promise} a promise that resolves to an array with one or zero agent objects\n */\nexport async function findAgentById(agentId: string) {\n debugMessage(`AgentApi.findAgentById: start`);\n const urlString = util.format(\n queryAgentURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentId\n );\n const { data } = await generateAmApi(getApiConfig()).get(urlString, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.findAgentById: end`);\n return data.result;\n}\n\n/**\n * Find agent by id\n * @param {string} agentType agent type (IdentityGatewayAgent, J2EEAgent, WebAgent)\n * @param {string} agentId agent id\n * @returns {Promise} a promise that resolves to an array with one or zero agent objects\n */\nexport async function findAgentByTypeAndId(agentType: string, agentId: string) {\n debugMessage(`AgentApi.findAgentById: start`);\n const urlString = util.format(\n queryAgentByTypeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentType,\n agentId\n );\n const { data } = await generateAmApi(getApiConfig()).get(urlString, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.findAgentById: end`);\n return data.result;\n}\n\n/**\n * Get agent\n * @param {string} agentType agent type (IdentityGatewayAgent, J2EEAgent, WebAgent)\n * @param {string} agentId agent id\n * @returns {Promise} a promise that resolves to an object containing an agent object of the specified type\n */\nexport async function getAgentByTypeAndId(agentType: string, agentId: string) {\n debugMessage(`AgentApi.getAgentByTypeAndId: start`);\n const urlString = util.format(\n agentURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentType,\n agentId\n );\n const { data } = await generateAmApi(getApiConfig()).get(urlString, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.getAgentByTypeAndId: end`);\n return data;\n}\n\n/**\n * Put agent\n * @param {string} agentType agent type (IdentityGatewayAgent, J2EEAgent, WebAgent)\n * @param {string} agentId agent id\n * @param {Object} agentData agent object\n * @returns {Promise} a promise that resolves to an object containing an agent object\n */\nexport async function putAgentByTypeAndId(\n agentType: string,\n agentId: string,\n agentData\n) {\n debugMessage(`AgentApi.putAgentByTypeAndId: start`);\n // until we figure out a way to use transport keys in Frodo,\n // we'll have to drop those encrypted attributes.\n const agent = deleteDeepByKey(agentData, '-encrypted');\n delete agent._provider;\n delete agent._rev;\n const urlString = util.format(\n agentURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentType,\n agentId\n );\n const { data } = await generateAmApi(getApiConfig()).put(urlString, agent, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.putAgentByTypeAndId: end`);\n return data;\n}\n\n/**\n * Delete agent\n * @param agentType agent type (IdentityGatewayAgent, J2EEAgent, WebAgent)\n * @param agentId agent id\n * @returns a promise that resolves to an object containing an agent object\n */\nexport async function deleteAgentByTypeAndId(\n agentType: string,\n agentId: string\n) {\n debugMessage(`AgentApi.deleteAgentByTypeAndId: start`);\n const urlString = util.format(\n agentURLTemplate,\n state.getHost(),\n getCurrentRealmPath(),\n agentType,\n agentId\n );\n const { data } = await generateAmApi(getApiConfig()).delete(urlString, {\n withCredentials: true,\n });\n debugMessage(`AgentApi.deleteAgentByTypeAndId: end`);\n return data;\n}\n"]}
|
package/types/api/ApiTypes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface ObjectSkeletonInterface {
|
|
2
2
|
_id: string;
|
|
3
3
|
_rev?: number;
|
|
4
|
-
[k: string]: string | number | boolean | string[] | ObjectSkeletonInterface;
|
|
4
|
+
[k: string]: string | number | boolean | string[] | ObjectSkeletonInterface | object | null;
|
|
5
5
|
}
|
|
6
6
|
export interface UiConfigInterface {
|
|
7
7
|
categories: string;
|
|
@@ -62,32 +62,32 @@ export type UiThemeRealmObject = ObjectSkeletonInterface & {
|
|
|
62
62
|
realm: Map<string, ThemeSkeleton[]>;
|
|
63
63
|
};
|
|
64
64
|
export declare enum ScriptLanguage {
|
|
65
|
-
GROOVY =
|
|
66
|
-
JAVASCRIPT =
|
|
65
|
+
GROOVY = 0,
|
|
66
|
+
JAVASCRIPT = 1
|
|
67
67
|
}
|
|
68
68
|
export declare enum ScriptContext {
|
|
69
|
-
OAUTH2_ACCESS_TOKEN_MODIFICATION =
|
|
70
|
-
AUTHENTICATION_CLIENT_SIDE =
|
|
71
|
-
AUTHENTICATION_TREE_DECISION_NODE =
|
|
72
|
-
AUTHENTICATION_SERVER_SIDE =
|
|
73
|
-
SOCIAL_IDP_PROFILE_TRANSFORMATION =
|
|
74
|
-
OAUTH2_VALIDATE_SCOPE =
|
|
75
|
-
CONFIG_PROVIDER_NODE =
|
|
76
|
-
OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER =
|
|
77
|
-
OAUTH2_EVALUATE_SCOPE =
|
|
78
|
-
POLICY_CONDITION =
|
|
79
|
-
OIDC_CLAIMS =
|
|
80
|
-
SAML2_IDP_ADAPTER =
|
|
81
|
-
SAML2_IDP_ATTRIBUTE_MAPPER =
|
|
82
|
-
OAUTH2_MAY_ACT =
|
|
69
|
+
OAUTH2_ACCESS_TOKEN_MODIFICATION = 0,
|
|
70
|
+
AUTHENTICATION_CLIENT_SIDE = 1,
|
|
71
|
+
AUTHENTICATION_TREE_DECISION_NODE = 2,
|
|
72
|
+
AUTHENTICATION_SERVER_SIDE = 3,
|
|
73
|
+
SOCIAL_IDP_PROFILE_TRANSFORMATION = 4,
|
|
74
|
+
OAUTH2_VALIDATE_SCOPE = 5,
|
|
75
|
+
CONFIG_PROVIDER_NODE = 6,
|
|
76
|
+
OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER = 7,
|
|
77
|
+
OAUTH2_EVALUATE_SCOPE = 8,
|
|
78
|
+
POLICY_CONDITION = 9,
|
|
79
|
+
OIDC_CLAIMS = 10,
|
|
80
|
+
SAML2_IDP_ADAPTER = 11,
|
|
81
|
+
SAML2_IDP_ATTRIBUTE_MAPPER = 12,
|
|
82
|
+
OAUTH2_MAY_ACT = 13
|
|
83
83
|
}
|
|
84
84
|
export type ScriptSkeleton = ObjectSkeletonInterface & {
|
|
85
85
|
name: string;
|
|
86
86
|
description: string;
|
|
87
|
-
|
|
88
|
-
script: string;
|
|
89
|
-
language: ScriptLanguage;
|
|
90
|
-
context: ScriptContext;
|
|
87
|
+
default: boolean;
|
|
88
|
+
script: string | string[];
|
|
89
|
+
language: keyof typeof ScriptLanguage;
|
|
90
|
+
context: keyof typeof ScriptContext;
|
|
91
91
|
createdBy: string;
|
|
92
92
|
creationDate: number;
|
|
93
93
|
lastModifiedBy: string;
|