onc_certification_g10_test_kit 7.1.0 → 7.2.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.
- checksums.yaml +4 -4
- data/config/presets/g10_reference_server_preset.json +708 -532
- data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +73 -67
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +1 -2
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +7 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +1 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +10 -2
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +6 -2
- data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +4 -0
- data/lib/onc_certification_g10_test_kit/configuration_checker.rb +1 -1
- data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +3 -3
- data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +7 -3
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +0 -4
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +8 -4
- data/lib/onc_certification_g10_test_kit/patient_context_test.rb +3 -3
- data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +3 -10
- data/lib/onc_certification_g10_test_kit/scope_constants.rb +52 -0
- data/lib/onc_certification_g10_test_kit/short_id_map.yml +11 -20
- data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +4 -4
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +4 -4
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +4 -4
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +4 -4
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +4 -4
- data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +107 -64
- data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +41 -88
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +31 -41
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +30 -52
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +32 -53
- data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +99 -142
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group.rb +16 -54
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +16 -54
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +16 -54
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +16 -54
- data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +29 -64
- data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_test.rb +4 -3
- data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +39 -83
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +42 -86
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +50 -88
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +9 -6
- data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +86 -278
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +30 -57
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +34 -73
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +34 -73
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +6 -1
- data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +88 -116
- data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +60 -114
- data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +2 -11
- data/lib/onc_certification_g10_test_kit/token_introspection_group.rb +12 -25
- data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +12 -14
- data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +44 -33
- data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +3 -3
- data/lib/onc_certification_g10_test_kit/version.rb +2 -2
- data/lib/onc_certification_g10_test_kit.rb +104 -40
- metadata +9 -8
@@ -10,13 +10,13 @@ module ONCCertificationG10TestKit
|
|
10
10
|
|
11
11
|
input_instructions %(
|
12
12
|
The purpose of this test is to verify that patient app users can restrict
|
13
|
-
access granted to apps to a limited number of resources
|
14
|
-
|
15
|
-
|
16
|
-
access granted matches these expectations.
|
13
|
+
access granted to apps to a limited number of resources. This test can
|
14
|
+
only be run after the Standalone Patient App test, and all other inputs
|
15
|
+
are locked to ensure the same launch configuration in both tests.
|
17
16
|
|
18
|
-
|
19
|
-
|
17
|
+
Enter which resources the user will grant access to below, and during the
|
18
|
+
launch process only grant access to those resources. Inferno will verify
|
19
|
+
that access granted matches these expectations.
|
20
20
|
)
|
21
21
|
|
22
22
|
description %(
|
@@ -38,18 +38,62 @@ module ONCCertificationG10TestKit
|
|
38
38
|
id :g10_smart_limited_app
|
39
39
|
run_as_group
|
40
40
|
|
41
|
+
input :expected_resources,
|
42
|
+
title: 'Expected Resource Grant for Limited Access Launch',
|
43
|
+
description: 'the user will only grant access to the following resources during authorization.',
|
44
|
+
default: 'patient, condition, observation'
|
45
|
+
|
41
46
|
input_order :expected_resources,
|
42
|
-
:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
:url
|
48
|
+
|
49
|
+
config(
|
50
|
+
inputs: {
|
51
|
+
url: { locked: true },
|
52
|
+
code: { name: :limited_code },
|
53
|
+
state: { name: :limited_state },
|
54
|
+
patient_id: { name: :limited_patient_id },
|
55
|
+
received_scopes: { name: :limited_received_scopes }
|
56
|
+
},
|
57
|
+
outputs: {
|
58
|
+
code: { name: :limited_code },
|
59
|
+
state: { name: :limited_state },
|
60
|
+
id_token: { name: :limited_id_token },
|
61
|
+
patient_id: { name: :limited_patient_id },
|
62
|
+
encounter_id: { name: :limited_encounter_id },
|
63
|
+
received_scopes: { name: :limited_received_scopes },
|
64
|
+
intent: { name: :limited_intent },
|
65
|
+
smart_auth_info: { name: :limited_smart_auth_info }
|
66
|
+
},
|
67
|
+
requests: {
|
68
|
+
redirect: { name: :limited_redirect },
|
69
|
+
token: { name: :limited_token }
|
70
|
+
},
|
71
|
+
options: {
|
72
|
+
ignore_missing_scopes_check: true,
|
73
|
+
redirect_message_proc: lambda do |auth_url|
|
74
|
+
expected_resource_string =
|
75
|
+
expected_resources
|
76
|
+
.split(',')
|
77
|
+
.map(&:strip)
|
78
|
+
.map { |resource_type| "* #{resource_type}\n" }
|
79
|
+
.join
|
80
|
+
|
81
|
+
<<~MESSAGE
|
82
|
+
### #{self.class.parent.parent.title}
|
83
|
+
|
84
|
+
[Follow this link to authorize with the SMART
|
85
|
+
server](#{auth_url}).
|
86
|
+
|
87
|
+
Tests will resume once Inferno receives a request at
|
88
|
+
`#{REDIRECT_URI}` with a state of `#{state}`.
|
89
|
+
|
90
|
+
Access should only be granted to the following resources:
|
91
|
+
|
92
|
+
#{expected_resource_string}
|
93
|
+
MESSAGE
|
94
|
+
end
|
95
|
+
}
|
96
|
+
)
|
53
97
|
|
54
98
|
group from: :smart_standalone_launch do
|
55
99
|
title 'Standalone Launch With Limited Scope'
|
@@ -91,99 +135,20 @@ module ONCCertificationG10TestKit
|
|
91
135
|
|
92
136
|
config(
|
93
137
|
inputs: {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
state: { name: :limited_state },
|
100
|
-
patient_id: { name: :limited_patient_id },
|
101
|
-
access_token: { name: :limited_access_token },
|
102
|
-
# TODO: separate standalone/ehr discovery outputs
|
103
|
-
smart_authorization_url: { locked: true, title: 'SMART Authorization Url' },
|
104
|
-
smart_token_url: { locked: true, title: 'SMART Token Url' },
|
105
|
-
received_scopes: { name: :limited_received_scopes },
|
106
|
-
smart_credentials: { name: :limited_smart_credentials }
|
107
|
-
},
|
108
|
-
outputs: {
|
109
|
-
code: { name: :limited_code },
|
110
|
-
token_retrieval_time: { name: :limited_token_retrieval_time },
|
111
|
-
state: { name: :limited_state },
|
112
|
-
id_token: { name: :limited_id_token },
|
113
|
-
refresh_token: { name: :limited_refresh_token },
|
114
|
-
access_token: { name: :limited_access_token },
|
115
|
-
expires_in: { name: :limited_expires_in },
|
116
|
-
patient_id: { name: :limited_patient_id },
|
117
|
-
encounter_id: { name: :limited_encounter_id },
|
118
|
-
received_scopes: { name: :limited_received_scopes },
|
119
|
-
intent: { name: :limited_intent },
|
120
|
-
smart_credentials: { name: :limited_smart_credentials }
|
121
|
-
},
|
122
|
-
requests: {
|
123
|
-
redirect: { name: :limited_redirect },
|
124
|
-
token: { name: :limited_token }
|
125
|
-
},
|
126
|
-
options: {
|
127
|
-
ignore_missing_scopes_check: true,
|
128
|
-
redirect_message_proc: lambda do |auth_url|
|
129
|
-
expected_resource_string =
|
130
|
-
expected_resources
|
131
|
-
.split(',')
|
132
|
-
.map(&:strip)
|
133
|
-
.map { |resource_type| "* #{resource_type}\n" }
|
134
|
-
.join
|
135
|
-
|
136
|
-
<<~MESSAGE
|
137
|
-
### #{self.class.parent.parent.title}
|
138
|
-
|
139
|
-
[Follow this link to authorize with the SMART
|
140
|
-
server](#{auth_url}).
|
141
|
-
|
142
|
-
Tests will resume once Inferno receives a request at
|
143
|
-
`#{REDIRECT_URI}` with a state of `#{state}`.
|
144
|
-
|
145
|
-
Access should only be granted to the following resources:
|
146
|
-
|
147
|
-
#{expected_resource_string}
|
148
|
-
MESSAGE
|
149
|
-
end
|
138
|
+
smart_auth_info: {
|
139
|
+
name: :standalone_smart_auth_info,
|
140
|
+
title: 'Standalone Launch Credentials',
|
141
|
+
locked: true
|
142
|
+
}
|
150
143
|
}
|
151
144
|
)
|
152
145
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
default: 'Patient, Condition, Observation'
|
157
|
-
|
158
|
-
test from: :g10_patient_context,
|
159
|
-
config: {
|
160
|
-
inputs: {
|
161
|
-
patient_id: { name: :limited_patient_id },
|
162
|
-
smart_credentials: { name: :limited_smart_credentials }
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
test from: :g10_limited_scope_grant do
|
167
|
-
config(
|
168
|
-
inputs: {
|
169
|
-
received_scopes: { name: :limited_received_scopes }
|
170
|
-
}
|
171
|
-
)
|
172
|
-
end
|
146
|
+
test from: :g10_patient_context
|
147
|
+
|
148
|
+
test from: :g10_limited_scope_grant
|
173
149
|
end
|
174
150
|
|
175
|
-
group from: :smart_standalone_launch_stu2
|
176
|
-
config: {
|
177
|
-
inputs: {
|
178
|
-
use_pkce: {
|
179
|
-
default: 'true',
|
180
|
-
locked: true
|
181
|
-
},
|
182
|
-
pkce_code_challenge_method: {
|
183
|
-
locked: true
|
184
|
-
}
|
185
|
-
}
|
186
|
-
} do
|
151
|
+
group from: :smart_standalone_launch_stu2 do
|
187
152
|
title 'Standalone Launch With Limited Scope'
|
188
153
|
description %(
|
189
154
|
# Background
|
@@ -214,103 +179,20 @@ module ONCCertificationG10TestKit
|
|
214
179
|
|
215
180
|
config(
|
216
181
|
inputs: {
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
code: { name: :limited_code },
|
222
|
-
state: { name: :limited_state },
|
223
|
-
patient_id: { name: :limited_patient_id },
|
224
|
-
access_token: { name: :limited_access_token },
|
225
|
-
# TODO: separate standalone/ehr discovery outputs
|
226
|
-
smart_authorization_url: { locked: true, title: 'SMART Authorization Url' },
|
227
|
-
smart_token_url: { locked: true, title: 'SMART Token Url' },
|
228
|
-
received_scopes: { name: :limited_received_scopes },
|
229
|
-
smart_credentials: { name: :limited_smart_credentials },
|
230
|
-
client_auth_type: {
|
231
|
-
locked: true,
|
232
|
-
default: 'confidential_symmetric'
|
182
|
+
smart_auth_info: {
|
183
|
+
name: :standalone_smart_auth_info,
|
184
|
+
title: 'Standalone Launch Credentials',
|
185
|
+
locked: true
|
233
186
|
}
|
234
|
-
},
|
235
|
-
outputs: {
|
236
|
-
code: { name: :limited_code },
|
237
|
-
token_retrieval_time: { name: :limited_token_retrieval_time },
|
238
|
-
state: { name: :limited_state },
|
239
|
-
id_token: { name: :limited_id_token },
|
240
|
-
refresh_token: { name: :limited_refresh_token },
|
241
|
-
access_token: { name: :limited_access_token },
|
242
|
-
expires_in: { name: :limited_expires_in },
|
243
|
-
patient_id: { name: :limited_patient_id },
|
244
|
-
encounter_id: { name: :limited_encounter_id },
|
245
|
-
received_scopes: { name: :limited_received_scopes },
|
246
|
-
intent: { name: :limited_intent },
|
247
|
-
smart_credentials: { name: :limited_smart_credentials }
|
248
|
-
},
|
249
|
-
requests: {
|
250
|
-
redirect: { name: :limited_redirect },
|
251
|
-
token: { name: :limited_token }
|
252
|
-
},
|
253
|
-
options: {
|
254
|
-
ignore_missing_scopes_check: true,
|
255
|
-
redirect_message_proc: lambda do |auth_url|
|
256
|
-
expected_resource_string =
|
257
|
-
expected_resources
|
258
|
-
.split(',')
|
259
|
-
.map(&:strip)
|
260
|
-
.map { |resource_type| "* #{resource_type}\n" }
|
261
|
-
.join
|
262
|
-
|
263
|
-
<<~MESSAGE
|
264
|
-
### #{self.class.parent.parent.title}
|
265
|
-
|
266
|
-
[Follow this link to authorize with the SMART
|
267
|
-
server](#{auth_url}).
|
268
|
-
|
269
|
-
Tests will resume once Inferno receives a request at
|
270
|
-
`#{REDIRECT_URI}` with a state of `#{state}`.
|
271
|
-
|
272
|
-
Access should only be granted to the following resources:
|
273
|
-
|
274
|
-
#{expected_resource_string}
|
275
|
-
MESSAGE
|
276
|
-
end
|
277
187
|
}
|
278
188
|
)
|
279
189
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
default: 'Patient, Condition, Observation'
|
284
|
-
|
285
|
-
test from: :g10_patient_context,
|
286
|
-
config: {
|
287
|
-
inputs: {
|
288
|
-
patient_id: { name: :limited_patient_id },
|
289
|
-
smart_credentials: { name: :limited_smart_credentials }
|
290
|
-
}
|
291
|
-
}
|
292
|
-
|
293
|
-
test from: :g10_limited_scope_grant do
|
294
|
-
config(
|
295
|
-
inputs: {
|
296
|
-
received_scopes: { name: :limited_received_scopes }
|
297
|
-
}
|
298
|
-
)
|
299
|
-
end
|
190
|
+
test from: :g10_patient_context
|
191
|
+
|
192
|
+
test from: :g10_limited_scope_grant
|
300
193
|
end
|
301
194
|
|
302
|
-
group from: :smart_standalone_launch_stu2_2
|
303
|
-
config: {
|
304
|
-
inputs: {
|
305
|
-
use_pkce: {
|
306
|
-
default: 'true',
|
307
|
-
locked: true
|
308
|
-
},
|
309
|
-
pkce_code_challenge_method: {
|
310
|
-
locked: true
|
311
|
-
}
|
312
|
-
}
|
313
|
-
} do
|
195
|
+
group from: :smart_standalone_launch_stu2_2 do # rubocop:disable Naming/VariableNumber
|
314
196
|
title 'Standalone Launch With Limited Scope'
|
315
197
|
description %(
|
316
198
|
# Background
|
@@ -341,97 +223,23 @@ module ONCCertificationG10TestKit
|
|
341
223
|
|
342
224
|
config(
|
343
225
|
inputs: {
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
code: { name: :limited_code },
|
349
|
-
state: { name: :limited_state },
|
350
|
-
patient_id: { name: :limited_patient_id },
|
351
|
-
access_token: { name: :limited_access_token },
|
352
|
-
# TODO: separate standalone/ehr discovery outputs
|
353
|
-
smart_authorization_url: { locked: true, title: 'SMART Authorization Url' },
|
354
|
-
smart_token_url: { locked: true, title: 'SMART Token Url' },
|
355
|
-
received_scopes: { name: :limited_received_scopes },
|
356
|
-
smart_credentials: { name: :limited_smart_credentials },
|
357
|
-
client_auth_type: {
|
358
|
-
locked: true,
|
359
|
-
default: 'confidential_symmetric'
|
226
|
+
smart_auth_info: {
|
227
|
+
name: :standalone_smart_auth_info,
|
228
|
+
title: 'Standalone Launch Credentials',
|
229
|
+
locked: true
|
360
230
|
}
|
361
|
-
},
|
362
|
-
outputs: {
|
363
|
-
code: { name: :limited_code },
|
364
|
-
token_retrieval_time: { name: :limited_token_retrieval_time },
|
365
|
-
state: { name: :limited_state },
|
366
|
-
id_token: { name: :limited_id_token },
|
367
|
-
refresh_token: { name: :limited_refresh_token },
|
368
|
-
access_token: { name: :limited_access_token },
|
369
|
-
expires_in: { name: :limited_expires_in },
|
370
|
-
patient_id: { name: :limited_patient_id },
|
371
|
-
encounter_id: { name: :limited_encounter_id },
|
372
|
-
received_scopes: { name: :limited_received_scopes },
|
373
|
-
intent: { name: :limited_intent },
|
374
|
-
smart_credentials: { name: :limited_smart_credentials }
|
375
|
-
},
|
376
|
-
requests: {
|
377
|
-
redirect: { name: :limited_redirect },
|
378
|
-
token: { name: :limited_token }
|
379
|
-
},
|
380
|
-
options: {
|
381
|
-
ignore_missing_scopes_check: true,
|
382
|
-
redirect_message_proc: lambda do |auth_url|
|
383
|
-
expected_resource_string =
|
384
|
-
expected_resources
|
385
|
-
.split(',')
|
386
|
-
.map(&:strip)
|
387
|
-
.map { |resource_type| "* #{resource_type}\n" }
|
388
|
-
.join
|
389
|
-
|
390
|
-
<<~MESSAGE
|
391
|
-
### #{self.class.parent.parent.title}
|
392
|
-
|
393
|
-
[Follow this link to authorize with the SMART
|
394
|
-
server](#{auth_url}).
|
395
|
-
|
396
|
-
Tests will resume once Inferno receives a request at
|
397
|
-
`#{REDIRECT_URI}` with a state of `#{state}`.
|
398
|
-
|
399
|
-
Access should only be granted to the following resources:
|
400
|
-
|
401
|
-
#{expected_resource_string}
|
402
|
-
MESSAGE
|
403
|
-
end
|
404
231
|
}
|
405
232
|
)
|
406
233
|
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
default: 'Patient, Condition, Observation'
|
411
|
-
|
412
|
-
test from: :g10_patient_context,
|
413
|
-
config: {
|
414
|
-
inputs: {
|
415
|
-
patient_id: { name: :limited_patient_id },
|
416
|
-
smart_credentials: { name: :limited_smart_credentials }
|
417
|
-
}
|
418
|
-
}
|
419
|
-
|
420
|
-
test from: :g10_limited_scope_grant do
|
421
|
-
config(
|
422
|
-
inputs: {
|
423
|
-
received_scopes: { name: :limited_received_scopes }
|
424
|
-
}
|
425
|
-
)
|
426
|
-
end
|
234
|
+
test from: :g10_patient_context
|
235
|
+
|
236
|
+
test from: :g10_limited_scope_grant
|
427
237
|
end
|
428
238
|
|
429
239
|
group from: :g10_restricted_resource_type_access,
|
430
240
|
config: {
|
431
241
|
inputs: {
|
432
|
-
|
433
|
-
received_scopes: { name: :limited_received_scopes },
|
434
|
-
smart_credentials: { name: :limited_smart_credentials }
|
242
|
+
smart_auth_info: { name: :limited_smart_auth_info }
|
435
243
|
}
|
436
244
|
}
|
437
245
|
end
|
@@ -1,5 +1,9 @@
|
|
1
|
+
require_relative 'scope_constants'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SMARTPublicStandaloneLaunchGroup < SMARTAppLaunch::StandaloneLaunchGroup
|
5
|
+
include ScopeConstants
|
6
|
+
|
3
7
|
title 'Public Client Standalone Launch with OpenID Connect'
|
4
8
|
short_title 'Public Client Launch'
|
5
9
|
input_instructions %(
|
@@ -38,32 +42,23 @@ module ONCCertificationG10TestKit
|
|
38
42
|
|
39
43
|
config(
|
40
44
|
inputs: {
|
41
|
-
|
42
|
-
name: :
|
43
|
-
title: 'Public Launch
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
patient/CarePlan.read patient/CareTeam.read patient/Condition.read
|
59
|
-
patient/Device.read patient/DiagnosticReport.read
|
60
|
-
patient/DocumentReference.read patient/Encounter.read
|
61
|
-
patient/Goal.read patient/Immunization.read patient/Location.read
|
62
|
-
patient/MedicationRequest.read patient/Observation.read
|
63
|
-
patient/Organization.read patient/Patient.read
|
64
|
-
patient/Practitioner.read patient/Procedure.read
|
65
|
-
patient/Provenance.read patient/PractitionerRole.read
|
66
|
-
).gsub(/\s{2,}/, ' ').strip
|
45
|
+
smart_auth_info: {
|
46
|
+
name: :public_smart_auth_info,
|
47
|
+
title: 'Public Launch Credentials',
|
48
|
+
options: {
|
49
|
+
mode: 'auth',
|
50
|
+
components: [
|
51
|
+
{
|
52
|
+
name: :auth_type,
|
53
|
+
default: 'public',
|
54
|
+
locked: true
|
55
|
+
},
|
56
|
+
{
|
57
|
+
name: :requested_scopes,
|
58
|
+
default: STANDALONE_SMART_1_SCOPES
|
59
|
+
}
|
60
|
+
]
|
61
|
+
}
|
67
62
|
},
|
68
63
|
url: {
|
69
64
|
title: 'Public Launch FHIR Endpoint',
|
@@ -75,31 +70,19 @@ module ONCCertificationG10TestKit
|
|
75
70
|
state: {
|
76
71
|
name: :public_state
|
77
72
|
},
|
78
|
-
|
79
|
-
|
80
|
-
description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
|
81
|
-
},
|
82
|
-
smart_token_url: {
|
83
|
-
title: 'OAuth 2.0 Token Endpoint',
|
84
|
-
description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
|
85
|
-
},
|
86
|
-
smart_credentials: {
|
87
|
-
name: :public_smart_credentials
|
73
|
+
patient_id: {
|
74
|
+
name: :public_patient_id
|
88
75
|
}
|
89
76
|
},
|
90
77
|
outputs: {
|
91
78
|
code: { name: :public_code },
|
92
|
-
token_retrieval_time: { name: :public_token_retrieval_time },
|
93
79
|
state: { name: :public_state },
|
94
80
|
id_token: { name: :public_id_token },
|
95
|
-
refresh_token: { name: :public_refresh_token },
|
96
|
-
access_token: { name: :public_access_token },
|
97
|
-
expires_in: { name: :public_expires_in },
|
98
81
|
patient_id: { name: :public_patient_id },
|
99
82
|
encounter_id: { name: :public_encounter_id },
|
100
83
|
received_scopes: { name: :public_received_scopes },
|
101
84
|
intent: { name: :public_intent },
|
102
|
-
|
85
|
+
smart_auth_info: { name: :public_smart_auth_info }
|
103
86
|
},
|
104
87
|
requests: {
|
105
88
|
redirect: { name: :public_redirect },
|
@@ -107,22 +90,7 @@ module ONCCertificationG10TestKit
|
|
107
90
|
}
|
108
91
|
)
|
109
92
|
|
110
|
-
|
111
|
-
:public_client_id,
|
112
|
-
:public_client_secret,
|
113
|
-
:public_requested_scopes,
|
114
|
-
:use_pkce,
|
115
|
-
:pkce_code_challenge_method,
|
116
|
-
:smart_authorization_url,
|
117
|
-
:smart_token_url
|
118
|
-
|
119
|
-
test from: :g10_patient_context,
|
120
|
-
config: {
|
121
|
-
inputs: {
|
122
|
-
patient_id: { name: :public_patient_id },
|
123
|
-
smart_credentials: { name: :public_smart_credentials }
|
124
|
-
}
|
125
|
-
}
|
93
|
+
test from: :g10_patient_context
|
126
94
|
|
127
95
|
test do
|
128
96
|
title 'OAuth token exchange response contains OpenID Connect id_token'
|
@@ -141,5 +109,10 @@ module ONCCertificationG10TestKit
|
|
141
109
|
assert id_token.present?, 'Token response did not provide an id_token as required.'
|
142
110
|
end
|
143
111
|
end
|
112
|
+
|
113
|
+
test from: :well_known_endpoint
|
114
|
+
|
115
|
+
# Move the well-known endpoint test to the beginning
|
116
|
+
children.prepend(children.pop)
|
144
117
|
end
|
145
118
|
end
|