@rockcarver/frodo-lib 0.11.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 (112) hide show
  1. package/.eslintrc +32 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. package/.github/README.md +121 -0
  5. package/.github/workflows/pipeline.yml +287 -0
  6. package/.prettierrc +6 -0
  7. package/CHANGELOG.md +512 -0
  8. package/CODE_OF_CONDUCT.md +128 -0
  9. package/LICENSE +21 -0
  10. package/README.md +8 -0
  11. package/docs/CONTRIBUTE.md +96 -0
  12. package/docs/PIPELINE.md +169 -0
  13. package/docs/images/npm_versioning_guidelines.png +0 -0
  14. package/docs/images/release_pipeline.png +0 -0
  15. package/jsconfig.json +6 -0
  16. package/package.json +95 -0
  17. package/resources/sampleEntitiesFile.json +8 -0
  18. package/resources/sampleEnvFile.env +2 -0
  19. package/src/api/AuthenticateApi.js +33 -0
  20. package/src/api/BaseApi.js +242 -0
  21. package/src/api/CirclesOfTrustApi.js +87 -0
  22. package/src/api/EmailTemplateApi.js +37 -0
  23. package/src/api/IdmConfigApi.js +88 -0
  24. package/src/api/LogApi.js +45 -0
  25. package/src/api/ManagedObjectApi.js +62 -0
  26. package/src/api/OAuth2ClientApi.js +69 -0
  27. package/src/api/OAuth2OIDCApi.js +73 -0
  28. package/src/api/OAuth2ProviderApi.js +32 -0
  29. package/src/api/RealmApi.js +99 -0
  30. package/src/api/Saml2Api.js +176 -0
  31. package/src/api/ScriptApi.js +84 -0
  32. package/src/api/SecretsApi.js +151 -0
  33. package/src/api/ServerInfoApi.js +41 -0
  34. package/src/api/SocialIdentityProvidersApi.js +114 -0
  35. package/src/api/StartupApi.js +45 -0
  36. package/src/api/ThemeApi.js +181 -0
  37. package/src/api/TreeApi.js +207 -0
  38. package/src/api/VariablesApi.js +104 -0
  39. package/src/api/utils/ApiUtils.js +77 -0
  40. package/src/api/utils/ApiUtils.test.js +96 -0
  41. package/src/api/utils/Base64.js +62 -0
  42. package/src/index.js +32 -0
  43. package/src/index.test.js +13 -0
  44. package/src/ops/AdminOps.js +901 -0
  45. package/src/ops/AuthenticateOps.js +342 -0
  46. package/src/ops/CirclesOfTrustOps.js +350 -0
  47. package/src/ops/ConnectionProfileOps.js +254 -0
  48. package/src/ops/EmailTemplateOps.js +326 -0
  49. package/src/ops/IdmOps.js +227 -0
  50. package/src/ops/IdpOps.js +342 -0
  51. package/src/ops/JourneyOps.js +2026 -0
  52. package/src/ops/LogOps.js +357 -0
  53. package/src/ops/ManagedObjectOps.js +34 -0
  54. package/src/ops/OAuth2ClientOps.js +151 -0
  55. package/src/ops/OrganizationOps.js +85 -0
  56. package/src/ops/RealmOps.js +139 -0
  57. package/src/ops/SamlOps.js +541 -0
  58. package/src/ops/ScriptOps.js +211 -0
  59. package/src/ops/SecretsOps.js +288 -0
  60. package/src/ops/StartupOps.js +114 -0
  61. package/src/ops/ThemeOps.js +379 -0
  62. package/src/ops/VariablesOps.js +185 -0
  63. package/src/ops/templates/OAuth2ClientTemplate.json +270 -0
  64. package/src/ops/templates/OrgModelUserAttributesTemplate.json +149 -0
  65. package/src/ops/templates/cloud/GenericExtensionAttributesTemplate.json +392 -0
  66. package/src/ops/templates/cloud/managed.json +4119 -0
  67. package/src/ops/utils/Console.js +434 -0
  68. package/src/ops/utils/DataProtection.js +92 -0
  69. package/src/ops/utils/DataProtection.test.js +28 -0
  70. package/src/ops/utils/ExportImportUtils.js +146 -0
  71. package/src/ops/utils/ExportImportUtils.test.js +119 -0
  72. package/src/ops/utils/OpsUtils.js +76 -0
  73. package/src/ops/utils/Wordwrap.js +11 -0
  74. package/src/storage/SessionStorage.js +45 -0
  75. package/src/storage/StaticStorage.js +15 -0
  76. package/test/e2e/journey/baseline/ForgottenUsername.journey.json +216 -0
  77. package/test/e2e/journey/baseline/Login.journey.json +205 -0
  78. package/test/e2e/journey/baseline/PasswordGrant.journey.json +139 -0
  79. package/test/e2e/journey/baseline/ProgressiveProfile.journey.json +198 -0
  80. package/test/e2e/journey/baseline/Registration.journey.json +249 -0
  81. package/test/e2e/journey/baseline/ResetPassword.journey.json +268 -0
  82. package/test/e2e/journey/baseline/UpdatePassword.journey.json +323 -0
  83. package/test/e2e/journey/baseline/allAlphaJourneys.journeys.json +1520 -0
  84. package/test/e2e/journey/delete/ForgottenUsername.journey.json +216 -0
  85. package/test/e2e/journey/delete/Login.journey.json +205 -0
  86. package/test/e2e/journey/delete/PasswordGrant.journey.json +139 -0
  87. package/test/e2e/journey/delete/ProgressiveProfile.journey.json +198 -0
  88. package/test/e2e/journey/delete/Registration.journey.json +249 -0
  89. package/test/e2e/journey/delete/ResetPassword.journey.json +268 -0
  90. package/test/e2e/journey/delete/UpdatePassword.journey.json +323 -0
  91. package/test/e2e/journey/delete/deleteMe.journey.json +230 -0
  92. package/test/e2e/journey/list/Disabled.journey.json +43 -0
  93. package/test/e2e/journey/list/ForgottenUsername.journey.json +216 -0
  94. package/test/e2e/journey/list/Login.journey.json +205 -0
  95. package/test/e2e/journey/list/PasswordGrant.journey.json +139 -0
  96. package/test/e2e/journey/list/ProgressiveProfile.journey.json +198 -0
  97. package/test/e2e/journey/list/Registration.journey.json +249 -0
  98. package/test/e2e/journey/list/ResetPassword.journey.json +268 -0
  99. package/test/e2e/journey/list/UpdatePassword.journey.json +323 -0
  100. package/test/e2e/setup.js +107 -0
  101. package/test/e2e/theme/baseline/Contrast.theme.json +95 -0
  102. package/test/e2e/theme/baseline/Highlander.theme.json +95 -0
  103. package/test/e2e/theme/baseline/Robroy.theme.json +95 -0
  104. package/test/e2e/theme/baseline/Starter-Theme.theme.json +94 -0
  105. package/test/e2e/theme/baseline/Zardoz.theme.json +95 -0
  106. package/test/e2e/theme/import/Contrast.theme.json +95 -0
  107. package/test/e2e/theme/import/Highlander.theme.json +95 -0
  108. package/test/e2e/theme/import/Robroy.theme.json +95 -0
  109. package/test/e2e/theme/import/Starter-Theme.theme.json +94 -0
  110. package/test/e2e/theme/import/Zardoz.default.theme.json +95 -0
  111. package/test/fs_tmp/.gitkeep +2 -0
  112. package/test/global/setup.js +65 -0
@@ -0,0 +1,268 @@
1
+ {
2
+ "meta": {
3
+ "origin": "https://openam-frodo-dev.forgeblocks.com/am",
4
+ "exportedBy": "volker.scheuber@forgerock.com",
5
+ "exportDate": "2022-06-20T17:54:08.347Z",
6
+ "exportTool": "frodo",
7
+ "exportToolVersion": "v0.6.1 [v18.2.0]"
8
+ },
9
+ "innerNodes": {
10
+ "276afa7c-a680-4cf4-a5f6-d6c78191f5c9": {
11
+ "_id": "276afa7c-a680-4cf4-a5f6-d6c78191f5c9",
12
+ "_rev": "-1256358519",
13
+ "attributesToCollect": [
14
+ "mail"
15
+ ],
16
+ "identityAttribute": "mail",
17
+ "validateInputs": false,
18
+ "required": true,
19
+ "_type": {
20
+ "_id": "AttributeCollectorNode",
21
+ "name": "Attribute Collector",
22
+ "collection": true
23
+ },
24
+ "_outcomes": [
25
+ {
26
+ "id": "outcome",
27
+ "displayName": "Outcome"
28
+ }
29
+ ]
30
+ },
31
+ "009c19c8-9572-47bb-adb2-1f092c559a43": {
32
+ "_id": "009c19c8-9572-47bb-adb2-1f092c559a43",
33
+ "_rev": "519412822",
34
+ "validateInput": true,
35
+ "passwordAttribute": "password",
36
+ "_type": {
37
+ "_id": "ValidatedPasswordNode",
38
+ "name": "Platform Password",
39
+ "collection": true
40
+ },
41
+ "_outcomes": [
42
+ {
43
+ "id": "outcome",
44
+ "displayName": "Outcome"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ "nodes": {
50
+ "06c97be5-7fdd-4739-aea1-ecc7fe082865": {
51
+ "_id": "06c97be5-7fdd-4739-aea1-ecc7fe082865",
52
+ "_rev": "-1138066714",
53
+ "emailSuspendMessage": {
54
+ "en": "An email has been sent to the address you entered. Click the link in that email to proceed."
55
+ },
56
+ "emailTemplateName": "resetPassword",
57
+ "identityAttribute": "mail",
58
+ "emailAttribute": "mail",
59
+ "objectLookup": true,
60
+ "_type": {
61
+ "_id": "EmailSuspendNode",
62
+ "name": "Email Suspend Node",
63
+ "collection": true
64
+ },
65
+ "_outcomes": [
66
+ {
67
+ "id": "outcome",
68
+ "displayName": "Outcome"
69
+ }
70
+ ]
71
+ },
72
+ "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a": {
73
+ "_id": "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a",
74
+ "_rev": "402776485",
75
+ "identityAttribute": "mail",
76
+ "identifier": "userName",
77
+ "_type": {
78
+ "_id": "IdentifyExistingUserNode",
79
+ "name": "Identify Existing User",
80
+ "collection": true
81
+ },
82
+ "_outcomes": [
83
+ {
84
+ "id": "true",
85
+ "displayName": "True"
86
+ },
87
+ {
88
+ "id": "false",
89
+ "displayName": "False"
90
+ }
91
+ ]
92
+ },
93
+ "989f0bf8-a328-4217-b82b-5275d79ca8bd": {
94
+ "_id": "989f0bf8-a328-4217-b82b-5275d79ca8bd",
95
+ "_rev": "555551070",
96
+ "identityResource": "managed/alpha_user",
97
+ "patchAsObject": false,
98
+ "ignoredFields": [],
99
+ "identityAttribute": "mail",
100
+ "_type": {
101
+ "_id": "PatchObjectNode",
102
+ "name": "Patch Object",
103
+ "collection": true
104
+ },
105
+ "_outcomes": [
106
+ {
107
+ "id": "PATCHED",
108
+ "displayName": "Patched"
109
+ },
110
+ {
111
+ "id": "FAILURE",
112
+ "displayName": "Failed"
113
+ }
114
+ ]
115
+ },
116
+ "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b": {
117
+ "_id": "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b",
118
+ "_rev": "86486605",
119
+ "nodes": [
120
+ {
121
+ "_id": "276afa7c-a680-4cf4-a5f6-d6c78191f5c9",
122
+ "nodeType": "AttributeCollectorNode",
123
+ "displayName": "Attribute Collector"
124
+ }
125
+ ],
126
+ "pageDescription": {
127
+ "en": "Enter your email address or <a href=\"#/service/Login\">Sign in</a>"
128
+ },
129
+ "pageHeader": {
130
+ "en": "Reset Password"
131
+ },
132
+ "_type": {
133
+ "_id": "PageNode",
134
+ "name": "Page Node",
135
+ "collection": true
136
+ },
137
+ "_outcomes": [
138
+ {
139
+ "id": "outcome",
140
+ "displayName": "Outcome"
141
+ }
142
+ ]
143
+ },
144
+ "e4c752f9-c625-48c9-9644-a58802fa9e9c": {
145
+ "_id": "e4c752f9-c625-48c9-9644-a58802fa9e9c",
146
+ "_rev": "1593283676",
147
+ "nodes": [
148
+ {
149
+ "_id": "009c19c8-9572-47bb-adb2-1f092c559a43",
150
+ "nodeType": "ValidatedPasswordNode",
151
+ "displayName": "Platform Password"
152
+ }
153
+ ],
154
+ "pageDescription": {
155
+ "en": "Change password"
156
+ },
157
+ "pageHeader": {
158
+ "en": "Reset Password"
159
+ },
160
+ "_type": {
161
+ "_id": "PageNode",
162
+ "name": "Page Node",
163
+ "collection": true
164
+ },
165
+ "_outcomes": [
166
+ {
167
+ "id": "outcome",
168
+ "displayName": "Outcome"
169
+ }
170
+ ]
171
+ }
172
+ },
173
+ "scripts": {},
174
+ "emailTemplates": {
175
+ "resetPassword": {
176
+ "_id": "emailTemplate/resetPassword",
177
+ "enabled": true,
178
+ "from": "",
179
+ "subject": {
180
+ "en": "Reset your password",
181
+ "fr": "Réinitialisez votre mot de passe"
182
+ },
183
+ "message": {
184
+ "en": "<h3>Click to reset your password</h3><h4><a href=\"{{object.resumeURI}}\">Password reset link</a></h4>",
185
+ "fr": "<h3>Cliquez pour réinitialiser votre mot de passe</h3><h4><a href=\"{{object.resumeURI}}\">Mot de passe lien de réinitialisation</a></h4>"
186
+ },
187
+ "defaultLocale": "en",
188
+ "mimeType": "text/html"
189
+ }
190
+ },
191
+ "socialIdentityProviders": {},
192
+ "themes": [],
193
+ "saml2Entities": {},
194
+ "circlesOfTrust": {},
195
+ "tree": {
196
+ "_id": "ResetPassword",
197
+ "_rev": "328000516",
198
+ "identityResource": "managed/alpha_user",
199
+ "uiConfig": {
200
+ "categories": "[\"Password Reset\"]"
201
+ },
202
+ "entryNodeId": "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b",
203
+ "nodes": {
204
+ "06c97be5-7fdd-4739-aea1-ecc7fe082865": {
205
+ "connections": {
206
+ "outcome": "e4c752f9-c625-48c9-9644-a58802fa9e9c"
207
+ },
208
+ "displayName": "Email Suspend Node",
209
+ "nodeType": "EmailSuspendNode",
210
+ "x": 453,
211
+ "y": 66
212
+ },
213
+ "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a": {
214
+ "connections": {
215
+ "false": "06c97be5-7fdd-4739-aea1-ecc7fe082865",
216
+ "true": "06c97be5-7fdd-4739-aea1-ecc7fe082865"
217
+ },
218
+ "displayName": "Identify Existing User",
219
+ "nodeType": "IdentifyExistingUserNode",
220
+ "x": 271,
221
+ "y": 21
222
+ },
223
+ "989f0bf8-a328-4217-b82b-5275d79ca8bd": {
224
+ "connections": {
225
+ "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a",
226
+ "PATCHED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0"
227
+ },
228
+ "displayName": "Patch Object",
229
+ "nodeType": "PatchObjectNode",
230
+ "x": 819,
231
+ "y": 61
232
+ },
233
+ "cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b": {
234
+ "connections": {
235
+ "outcome": "21b8ddf3-0203-4ae1-ab05-51cf3a3a707a"
236
+ },
237
+ "displayName": "Page Node",
238
+ "nodeType": "PageNode",
239
+ "x": 103,
240
+ "y": 50
241
+ },
242
+ "e4c752f9-c625-48c9-9644-a58802fa9e9c": {
243
+ "connections": {
244
+ "outcome": "989f0bf8-a328-4217-b82b-5275d79ca8bd"
245
+ },
246
+ "displayName": "Page Node",
247
+ "nodeType": "PageNode",
248
+ "x": 643,
249
+ "y": 50
250
+ }
251
+ },
252
+ "description": "Reset Password Tree",
253
+ "staticNodes": {
254
+ "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {
255
+ "x": 970,
256
+ "y": 79
257
+ },
258
+ "e301438c-0bd0-429c-ab0c-66126501069a": {
259
+ "x": 981,
260
+ "y": 147
261
+ },
262
+ "startNode": {
263
+ "x": 25,
264
+ "y": 25
265
+ }
266
+ }
267
+ }
268
+ }
@@ -0,0 +1,323 @@
1
+ {
2
+ "meta": {
3
+ "origin": "https://openam-frodo-dev.forgeblocks.com/am",
4
+ "exportedBy": "volker.scheuber@forgerock.com",
5
+ "exportDate": "2022-06-20T17:54:11.432Z",
6
+ "exportTool": "frodo",
7
+ "exportToolVersion": "v0.6.1 [v18.2.0]"
8
+ },
9
+ "innerNodes": {
10
+ "fe2962fc-4db3-4066-8624-553649afc438": {
11
+ "_id": "fe2962fc-4db3-4066-8624-553649afc438",
12
+ "_rev": "875005143",
13
+ "validateInput": false,
14
+ "passwordAttribute": "password",
15
+ "_type": {
16
+ "_id": "ValidatedPasswordNode",
17
+ "name": "Platform Password",
18
+ "collection": true
19
+ },
20
+ "_outcomes": [
21
+ {
22
+ "id": "outcome",
23
+ "displayName": "Outcome"
24
+ }
25
+ ]
26
+ },
27
+ "21a99653-a7a7-47ee-b650-f493a84bba09": {
28
+ "_id": "21a99653-a7a7-47ee-b650-f493a84bba09",
29
+ "_rev": "688403743",
30
+ "validateInput": true,
31
+ "passwordAttribute": "password",
32
+ "_type": {
33
+ "_id": "ValidatedPasswordNode",
34
+ "name": "Platform Password",
35
+ "collection": true
36
+ },
37
+ "_outcomes": [
38
+ {
39
+ "id": "outcome",
40
+ "displayName": "Outcome"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ "nodes": {
46
+ "0f0904e6-1da3-4cdb-9abf-0d2545016fab": {
47
+ "_id": "0f0904e6-1da3-4cdb-9abf-0d2545016fab",
48
+ "_rev": "-1218497043",
49
+ "presentAttribute": "password",
50
+ "identityAttribute": "userName",
51
+ "_type": {
52
+ "_id": "AttributePresentDecisionNode",
53
+ "name": "Attribute Present Decision",
54
+ "collection": true
55
+ },
56
+ "_outcomes": [
57
+ {
58
+ "id": "true",
59
+ "displayName": "True"
60
+ },
61
+ {
62
+ "id": "false",
63
+ "displayName": "False"
64
+ }
65
+ ]
66
+ },
67
+ "20237b34-26cb-4a0b-958f-abb422290d42": {
68
+ "_id": "20237b34-26cb-4a0b-958f-abb422290d42",
69
+ "_rev": "1965792723",
70
+ "nodes": [
71
+ {
72
+ "_id": "fe2962fc-4db3-4066-8624-553649afc438",
73
+ "nodeType": "ValidatedPasswordNode",
74
+ "displayName": "Platform Password"
75
+ }
76
+ ],
77
+ "pageDescription": {
78
+ "en": "Enter current password"
79
+ },
80
+ "pageHeader": {
81
+ "en": "Verify Existing Password"
82
+ },
83
+ "_type": {
84
+ "_id": "PageNode",
85
+ "name": "Page Node",
86
+ "collection": true
87
+ },
88
+ "_outcomes": [
89
+ {
90
+ "id": "outcome",
91
+ "displayName": "Outcome"
92
+ }
93
+ ]
94
+ },
95
+ "3990ce1f-cce6-435b-ae1c-f138e89411c1": {
96
+ "_id": "3990ce1f-cce6-435b-ae1c-f138e89411c1",
97
+ "_rev": "-212483341",
98
+ "identityResource": "managed/alpha_user",
99
+ "patchAsObject": false,
100
+ "ignoredFields": [
101
+ "userName"
102
+ ],
103
+ "identityAttribute": "userName",
104
+ "_type": {
105
+ "_id": "PatchObjectNode",
106
+ "name": "Patch Object",
107
+ "collection": true
108
+ },
109
+ "_outcomes": [
110
+ {
111
+ "id": "PATCHED",
112
+ "displayName": "Patched"
113
+ },
114
+ {
115
+ "id": "FAILURE",
116
+ "displayName": "Failed"
117
+ }
118
+ ]
119
+ },
120
+ "7d1deabe-cd98-49c8-943f-ca12305775f3": {
121
+ "_id": "7d1deabe-cd98-49c8-943f-ca12305775f3",
122
+ "_rev": "869693667",
123
+ "_type": {
124
+ "_id": "DataStoreDecisionNode",
125
+ "name": "Data Store Decision",
126
+ "collection": true
127
+ },
128
+ "_outcomes": [
129
+ {
130
+ "id": "true",
131
+ "displayName": "True"
132
+ },
133
+ {
134
+ "id": "false",
135
+ "displayName": "False"
136
+ }
137
+ ]
138
+ },
139
+ "a3d97b53-e38a-4b24-aed0-a021050eb744": {
140
+ "_id": "a3d97b53-e38a-4b24-aed0-a021050eb744",
141
+ "_rev": "-1059437256",
142
+ "emailSuspendMessage": {
143
+ "en": "An email has been sent to your address, please verify your email address to update your password. Click the link in that email to proceed."
144
+ },
145
+ "identityAttribute": "userName",
146
+ "emailTemplateName": "updatePassword",
147
+ "emailAttribute": "mail",
148
+ "objectLookup": true,
149
+ "_type": {
150
+ "_id": "EmailSuspendNode",
151
+ "name": "Email Suspend Node",
152
+ "collection": true
153
+ },
154
+ "_outcomes": [
155
+ {
156
+ "id": "outcome",
157
+ "displayName": "Outcome"
158
+ }
159
+ ]
160
+ },
161
+ "d018fcd1-4e22-4160-8c41-63bee51c9cb3": {
162
+ "_id": "d018fcd1-4e22-4160-8c41-63bee51c9cb3",
163
+ "_rev": "-1359533036",
164
+ "nodes": [
165
+ {
166
+ "_id": "21a99653-a7a7-47ee-b650-f493a84bba09",
167
+ "nodeType": "ValidatedPasswordNode",
168
+ "displayName": "Platform Password"
169
+ }
170
+ ],
171
+ "pageDescription": {
172
+ "en": "Enter new password"
173
+ },
174
+ "pageHeader": {
175
+ "en": "Update Password"
176
+ },
177
+ "_type": {
178
+ "_id": "PageNode",
179
+ "name": "Page Node",
180
+ "collection": true
181
+ },
182
+ "_outcomes": [
183
+ {
184
+ "id": "outcome",
185
+ "displayName": "Outcome"
186
+ }
187
+ ]
188
+ },
189
+ "d1b79744-493a-44fe-bc26-7d324a8caa4e": {
190
+ "_id": "d1b79744-493a-44fe-bc26-7d324a8caa4e",
191
+ "_rev": "-716667889",
192
+ "sessionDataKey": "UserToken",
193
+ "sharedStateKey": "userName",
194
+ "_type": {
195
+ "_id": "SessionDataNode",
196
+ "name": "Get Session Data",
197
+ "collection": true
198
+ },
199
+ "_outcomes": [
200
+ {
201
+ "id": "outcome",
202
+ "displayName": "Outcome"
203
+ }
204
+ ]
205
+ }
206
+ },
207
+ "scripts": {},
208
+ "emailTemplates": {
209
+ "updatePassword": {
210
+ "_id": "emailTemplate/updatePassword",
211
+ "enabled": true,
212
+ "from": "",
213
+ "subject": {
214
+ "en": "Update your password"
215
+ },
216
+ "message": {
217
+ "en": "<html><head></head><body style=\"background-color: #324054; color: #5e6d82; padding: 60px; text-align: center;\"><div class=\"content\" style=\"background-color: #fff; border-radius: 4px; margin: 0 auto; padding: 48px; width: 235px;\"><h3 id=\"verifyemailtoupdatepassword\">Verify email to update password</h3><p><a href=\"{{object.resumeURI}}\" style=\"text-decoration: none; color: #109cf1;\">Update password link</a></p></div></body></html>"
218
+ },
219
+ "html": {
220
+ "en": "<h3>Verify email to update password</h3><p><a href=\"{{object.resumeURI}}\">Update password link</a></p>"
221
+ },
222
+ "styles": "body{background-color:#324054;color:#5e6d82;padding:60px;text-align:center}a{text-decoration:none;color:#109cf1}.content{background-color:#fff;border-radius:4px;margin:0 auto;padding:48px;width:235px}",
223
+ "defaultLocale": "en",
224
+ "mimeType": "text/html"
225
+ }
226
+ },
227
+ "socialIdentityProviders": {},
228
+ "themes": [],
229
+ "saml2Entities": {},
230
+ "circlesOfTrust": {},
231
+ "tree": {
232
+ "_id": "UpdatePassword",
233
+ "_rev": "-237395169",
234
+ "identityResource": "managed/alpha_user",
235
+ "uiConfig": {
236
+ "categories": "[\"Password Reset\"]"
237
+ },
238
+ "entryNodeId": "d1b79744-493a-44fe-bc26-7d324a8caa4e",
239
+ "nodes": {
240
+ "0f0904e6-1da3-4cdb-9abf-0d2545016fab": {
241
+ "connections": {
242
+ "false": "a3d97b53-e38a-4b24-aed0-a021050eb744",
243
+ "true": "20237b34-26cb-4a0b-958f-abb422290d42"
244
+ },
245
+ "displayName": "Attribute Present Decision",
246
+ "nodeType": "AttributePresentDecisionNode",
247
+ "x": 288,
248
+ "y": 133
249
+ },
250
+ "20237b34-26cb-4a0b-958f-abb422290d42": {
251
+ "connections": {
252
+ "outcome": "7d1deabe-cd98-49c8-943f-ca12305775f3"
253
+ },
254
+ "displayName": "Page Node",
255
+ "nodeType": "PageNode",
256
+ "x": 526,
257
+ "y": 46
258
+ },
259
+ "3990ce1f-cce6-435b-ae1c-f138e89411c1": {
260
+ "connections": {
261
+ "FAILURE": "e301438c-0bd0-429c-ab0c-66126501069a",
262
+ "PATCHED": "70e691a5-1e33-4ac3-a356-e7b6d60d92e0"
263
+ },
264
+ "displayName": "Patch Object",
265
+ "nodeType": "PatchObjectNode",
266
+ "x": 1062,
267
+ "y": 189
268
+ },
269
+ "7d1deabe-cd98-49c8-943f-ca12305775f3": {
270
+ "connections": {
271
+ "false": "e301438c-0bd0-429c-ab0c-66126501069a",
272
+ "true": "d018fcd1-4e22-4160-8c41-63bee51c9cb3"
273
+ },
274
+ "displayName": "Data Store Decision",
275
+ "nodeType": "DataStoreDecisionNode",
276
+ "x": 722,
277
+ "y": 45
278
+ },
279
+ "a3d97b53-e38a-4b24-aed0-a021050eb744": {
280
+ "connections": {
281
+ "outcome": "d018fcd1-4e22-4160-8c41-63bee51c9cb3"
282
+ },
283
+ "displayName": "Email Suspend Node",
284
+ "nodeType": "EmailSuspendNode",
285
+ "x": 659,
286
+ "y": 223
287
+ },
288
+ "d018fcd1-4e22-4160-8c41-63bee51c9cb3": {
289
+ "connections": {
290
+ "outcome": "3990ce1f-cce6-435b-ae1c-f138e89411c1"
291
+ },
292
+ "displayName": "Page Node",
293
+ "nodeType": "PageNode",
294
+ "x": 943,
295
+ "y": 30
296
+ },
297
+ "d1b79744-493a-44fe-bc26-7d324a8caa4e": {
298
+ "connections": {
299
+ "outcome": "0f0904e6-1da3-4cdb-9abf-0d2545016fab"
300
+ },
301
+ "displayName": "Get Session Data",
302
+ "nodeType": "SessionDataNode",
303
+ "x": 122,
304
+ "y": 129
305
+ }
306
+ },
307
+ "description": "Update password using active session",
308
+ "staticNodes": {
309
+ "70e691a5-1e33-4ac3-a356-e7b6d60d92e0": {
310
+ "x": 1212,
311
+ "y": 128
312
+ },
313
+ "e301438c-0bd0-429c-ab0c-66126501069a": {
314
+ "x": 939,
315
+ "y": 290
316
+ },
317
+ "startNode": {
318
+ "x": 50,
319
+ "y": 25
320
+ }
321
+ }
322
+ }
323
+ }
@@ -0,0 +1,107 @@
1
+ import fs from 'fs';
2
+ import { Authenticate, state } from '../../src/index.js';
3
+
4
+ export default async function setup(globalConfig) {
5
+ let run = globalConfig.nonFlagArgs.length === 0;
6
+ for (const arg of globalConfig.nonFlagArgs) {
7
+ if (arg.indexOf('e2e') > -1) run = true;
8
+ }
9
+ if (run) {
10
+ console.log('----- begin e2e global setup -----');
11
+
12
+ // make sure we have connectivity
13
+ try {
14
+ state.default.session.setTenant(
15
+ process.env.FIDC_TENANT_URL ||
16
+ 'https://openam-frodo-dev.forgeblocks.com/am'
17
+ );
18
+ state.default.session.setRealm('alpha');
19
+ state.default.session.setUsername(
20
+ process.env.FIDC_TENANT_ADMIN_USERNAME ||
21
+ 'volker.scheuber@forgerock.com'
22
+ );
23
+ state.default.session.setPassword(
24
+ process.env.FIDC_TENANT_ADMIN_PASSWORD ||
25
+ fs.readFileSync(new URL('./FIDC_TENANT_PWD', import.meta.url))
26
+ );
27
+
28
+ await Authenticate.getTokens();
29
+ if (
30
+ state.default.session.getCookieName() &&
31
+ state.default.session.getCookieValue() &&
32
+ state.default.session.getBearerToken()
33
+ ) {
34
+ console.log(`successfully obtained session from frodo-dev`);
35
+ } else {
36
+ console.dir(state.default.session.raw);
37
+ throw new Error('cannot get session from frodo-dev');
38
+ }
39
+ } catch (error) {
40
+ console.log(`cannot get session from frodo-dev: ${error}`);
41
+ console.dir(error);
42
+ throw new Error('cannot get session from frodo-dev');
43
+ }
44
+
45
+ console.log('----- end e2e global setup -----');
46
+ }
47
+ }
48
+
49
+ /*
50
+ {
51
+ bail: 0,
52
+ changedFilesWithAncestor: false,
53
+ changedSince: undefined,
54
+ collectCoverage: false,
55
+ collectCoverageFrom: [],
56
+ collectCoverageOnlyFrom: undefined,
57
+ coverageDirectory: '/Users/vscheuber/Projects/frodo/coverage',
58
+ coverageProvider: 'babel',
59
+ coverageReporters: [ 'json', 'text', 'lcov', 'clover' ],
60
+ coverageThreshold: undefined,
61
+ detectLeaks: false,
62
+ detectOpenHandles: false,
63
+ errorOnDeprecated: false,
64
+ expand: false,
65
+ filter: undefined,
66
+ findRelatedTests: false,
67
+ forceExit: false,
68
+ globalSetup: '/Users/vscheuber/Projects/frodo/test/global/global-setup.js',
69
+ globalTeardown: undefined,
70
+ json: false,
71
+ lastCommit: false,
72
+ listTests: false,
73
+ logHeapUsage: false,
74
+ maxConcurrency: 5,
75
+ maxWorkers: 15,
76
+ noSCM: undefined,
77
+ noStackTrace: false,
78
+ nonFlagArgs: [ 'e2e' ],
79
+ notify: false,
80
+ notifyMode: 'failure-change',
81
+ onlyChanged: false,
82
+ onlyFailures: false,
83
+ outputFile: undefined,
84
+ passWithNoTests: false,
85
+ projects: [],
86
+ replname: undefined,
87
+ reporters: undefined,
88
+ rootDir: '/Users/vscheuber/Projects/frodo',
89
+ runTestsByPath: false,
90
+ silent: undefined,
91
+ skipFilter: false,
92
+ snapshotFormat: undefined,
93
+ testFailureExitCode: 1,
94
+ testNamePattern: undefined,
95
+ testPathPattern: 'e2e',
96
+ testResultsProcessor: undefined,
97
+ testSequencer: '/Users/vscheuber/Projects/frodo/node_modules/@jest/test-sequencer/build/index.js',
98
+ testTimeout: undefined,
99
+ updateSnapshot: 'new',
100
+ useStderr: false,
101
+ verbose: true,
102
+ watch: false,
103
+ watchAll: false,
104
+ watchPlugins: undefined,
105
+ watchman: true
106
+ }
107
+ */