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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/g10_reference_server_preset.json +708 -532
  3. data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +73 -67
  4. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +1 -2
  5. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +7 -1
  6. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +1 -1
  7. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +10 -2
  8. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +6 -2
  9. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +4 -0
  10. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +1 -1
  11. data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +3 -3
  12. data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +7 -3
  13. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +0 -4
  14. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +8 -4
  15. data/lib/onc_certification_g10_test_kit/patient_context_test.rb +3 -3
  16. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +3 -10
  17. data/lib/onc_certification_g10_test_kit/scope_constants.rb +52 -0
  18. data/lib/onc_certification_g10_test_kit/short_id_map.yml +11 -20
  19. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +4 -4
  20. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +4 -4
  21. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +4 -4
  22. data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +4 -4
  23. data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +4 -4
  24. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +107 -64
  25. data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +41 -88
  26. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +31 -41
  27. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +30 -52
  28. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +32 -53
  29. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +99 -142
  30. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group.rb +16 -54
  31. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +16 -54
  32. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +16 -54
  33. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +16 -54
  34. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +29 -64
  35. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_test.rb +4 -3
  36. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +39 -83
  37. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +42 -86
  38. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +50 -88
  39. data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +9 -6
  40. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +86 -278
  41. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +30 -57
  42. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +34 -73
  43. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +34 -73
  44. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +6 -1
  45. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +88 -116
  46. data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +60 -114
  47. data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +2 -11
  48. data/lib/onc_certification_g10_test_kit/token_introspection_group.rb +12 -25
  49. data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +12 -14
  50. data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +44 -33
  51. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +3 -3
  52. data/lib/onc_certification_g10_test_kit/version.rb +2 -2
  53. data/lib/onc_certification_g10_test_kit.rb +104 -40
  54. metadata +9 -8
@@ -1,5 +1,9 @@
1
+ require_relative 'scope_constants'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SMARTPublicStandaloneLaunchGroupSTU2 < SMARTAppLaunch::StandaloneLaunchGroupSTU2
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,31 +42,28 @@ module ONCCertificationG10TestKit
38
42
 
39
43
  config(
40
44
  inputs: {
41
- client_id: {
42
- name: :public_client_id,
43
- title: 'Public Launch Client ID'
44
- },
45
- client_secret: {
46
- name: :public_client_secret,
47
- title: 'Public Launch Client Secret',
48
- default: nil,
49
- optional: true,
50
- locked: true
51
- },
52
- requested_scopes: {
53
- name: :public_requested_scopes,
54
- title: 'Public Launch Scope',
55
- default: %(
56
- launch/patient openid fhirUser offline_access patient/Medication.rs
57
- patient/AllergyIntolerance.rs patient/CarePlan.rs
58
- patient/CareTeam.rs patient/Condition.rs patient/Device.rs
59
- patient/DiagnosticReport.rs patient/DocumentReference.rs
60
- patient/Encounter.rs patient/Goal.rs patient/Immunization.rs
61
- patient/Location.rs patient/MedicationRequest.rs
62
- patient/Observation.rs patient/Organization.rs patient/Patient.rs
63
- patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs
64
- patient/PractitionerRole.rs
65
- ).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: :auth_request_method,
58
+ default: 'GET',
59
+ locked: true
60
+ },
61
+ {
62
+ name: :requested_scopes,
63
+ default: STANDALONE_SMART_2_SCOPES
64
+ }
65
+ ]
66
+ }
66
67
  },
67
68
  url: {
68
69
  title: 'Public Launch FHIR Endpoint',
@@ -74,43 +75,19 @@ module ONCCertificationG10TestKit
74
75
  state: {
75
76
  name: :public_state
76
77
  },
77
- smart_authorization_url: {
78
- title: 'OAuth 2.0 Authorize Endpoint',
79
- description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
80
- },
81
- smart_token_url: {
82
- title: 'OAuth 2.0 Token Endpoint',
83
- description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
84
- },
85
- smart_credentials: {
86
- name: :public_smart_credentials
87
- },
88
- use_pkce: {
89
- default: 'true',
90
- locked: true
91
- },
92
- pkce_code_challenge_method: {
93
- locked: true
94
- },
95
- client_auth_type: {
96
- name: :public_client_auth_type,
97
- locked: true,
98
- default: 'public'
78
+ patient_id: {
79
+ name: :public_patient_id
99
80
  }
100
81
  },
101
82
  outputs: {
102
83
  code: { name: :public_code },
103
- token_retrieval_time: { name: :public_token_retrieval_time },
104
84
  state: { name: :public_state },
105
85
  id_token: { name: :public_id_token },
106
- refresh_token: { name: :public_refresh_token },
107
- access_token: { name: :public_access_token },
108
- expires_in: { name: :public_expires_in },
109
86
  patient_id: { name: :public_patient_id },
110
87
  encounter_id: { name: :public_encounter_id },
111
88
  received_scopes: { name: :public_received_scopes },
112
89
  intent: { name: :public_intent },
113
- smart_credentials: { name: :public_smart_credentials }
90
+ smart_auth_info: { name: :public_smart_auth_info }
114
91
  },
115
92
  requests: {
116
93
  redirect: { name: :public_redirect },
@@ -118,24 +95,7 @@ module ONCCertificationG10TestKit
118
95
  }
119
96
  )
120
97
 
121
- input_order :url,
122
- :public_client_id,
123
- :public_client_secret,
124
- :public_requested_scopes,
125
- :use_pkce,
126
- :pkce_code_challenge_method,
127
- :smart_authorization_url,
128
- :smart_token_url,
129
- :authorization_method,
130
- :public_client_auth_type
131
-
132
- test from: :g10_patient_context,
133
- config: {
134
- inputs: {
135
- patient_id: { name: :public_patient_id },
136
- smart_credentials: { name: :public_smart_credentials }
137
- }
138
- }
98
+ test from: :g10_patient_context
139
99
 
140
100
  test do
141
101
  title 'OAuth token exchange response contains OpenID Connect id_token'
@@ -155,8 +115,9 @@ module ONCCertificationG10TestKit
155
115
  end
156
116
  end
157
117
 
158
- children.each do |child|
159
- child.inputs.delete(:client_auth_encryption_method)
160
- end
118
+ test from: :well_known_endpoint
119
+
120
+ # Move the well-known endpoint test to the beginning
121
+ children.prepend(children.pop)
161
122
  end
162
123
  end
@@ -1,5 +1,9 @@
1
+ require_relative 'scope_constants'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SMARTPublicStandaloneLaunchGroupTestSTU22 < SMARTAppLaunch::StandaloneLaunchGroupSTU2
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,31 +42,28 @@ module ONCCertificationG10TestKit
38
42
 
39
43
  config(
40
44
  inputs: {
41
- client_id: {
42
- name: :public_client_id,
43
- title: 'Public Launch Client ID'
44
- },
45
- client_secret: {
46
- name: :public_client_secret,
47
- title: 'Public Launch Client Secret',
48
- default: nil,
49
- optional: true,
50
- locked: true
51
- },
52
- requested_scopes: {
53
- name: :public_requested_scopes,
54
- title: 'Public Launch Scope',
55
- default: %(
56
- launch/patient openid fhirUser offline_access patient/Medication.rs
57
- patient/AllergyIntolerance.rs patient/CarePlan.rs
58
- patient/CareTeam.rs patient/Condition.rs patient/Device.rs
59
- patient/DiagnosticReport.rs patient/DocumentReference.rs
60
- patient/Encounter.rs patient/Goal.rs patient/Immunization.rs
61
- patient/Location.rs patient/MedicationRequest.rs
62
- patient/Observation.rs patient/Organization.rs patient/Patient.rs
63
- patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs
64
- patient/PractitionerRole.rs
65
- ).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: :auth_request_method,
58
+ default: 'GET',
59
+ locked: true
60
+ },
61
+ {
62
+ name: :requested_scopes,
63
+ default: STANDALONE_SMART_2_SCOPES
64
+ }
65
+ ]
66
+ }
66
67
  },
67
68
  url: {
68
69
  title: 'Public Launch FHIR Endpoint',
@@ -74,43 +75,19 @@ module ONCCertificationG10TestKit
74
75
  state: {
75
76
  name: :public_state
76
77
  },
77
- smart_authorization_url: {
78
- title: 'OAuth 2.0 Authorize Endpoint',
79
- description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
80
- },
81
- smart_token_url: {
82
- title: 'OAuth 2.0 Token Endpoint',
83
- description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
84
- },
85
- smart_credentials: {
86
- name: :public_smart_credentials
87
- },
88
- use_pkce: {
89
- default: 'true',
90
- locked: true
91
- },
92
- pkce_code_challenge_method: {
93
- locked: true
94
- },
95
- client_auth_type: {
96
- name: :public_client_auth_type,
97
- locked: true,
98
- default: 'public'
78
+ patient_id: {
79
+ name: :public_patient_id
99
80
  }
100
81
  },
101
82
  outputs: {
102
83
  code: { name: :public_code },
103
- token_retrieval_time: { name: :public_token_retrieval_time },
104
84
  state: { name: :public_state },
105
85
  id_token: { name: :public_id_token },
106
- refresh_token: { name: :public_refresh_token },
107
- access_token: { name: :public_access_token },
108
- expires_in: { name: :public_expires_in },
109
86
  patient_id: { name: :public_patient_id },
110
87
  encounter_id: { name: :public_encounter_id },
111
88
  received_scopes: { name: :public_received_scopes },
112
89
  intent: { name: :public_intent },
113
- smart_credentials: { name: :public_smart_credentials }
90
+ smart_auth_info: { name: :public_smart_auth_info }
114
91
  },
115
92
  requests: {
116
93
  redirect: { name: :public_redirect },
@@ -118,24 +95,7 @@ module ONCCertificationG10TestKit
118
95
  }
119
96
  )
120
97
 
121
- input_order :url,
122
- :public_client_id,
123
- :public_client_secret,
124
- :public_requested_scopes,
125
- :use_pkce,
126
- :pkce_code_challenge_method,
127
- :smart_authorization_url,
128
- :smart_token_url,
129
- :authorization_method,
130
- :public_client_auth_type
131
-
132
- test from: :g10_patient_context,
133
- config: {
134
- inputs: {
135
- patient_id: { name: :public_patient_id },
136
- smart_credentials: { name: :public_smart_credentials }
137
- }
138
- }
98
+ test from: :g10_patient_context
139
99
 
140
100
  test do
141
101
  title 'OAuth token exchange response contains OpenID Connect id_token'
@@ -155,8 +115,9 @@ module ONCCertificationG10TestKit
155
115
  end
156
116
  end
157
117
 
158
- children.each do |child|
159
- child.inputs.delete(:client_auth_encryption_method)
160
- end
118
+ test from: :well_known_endpoint
119
+
120
+ # Move the well-known endpoint test to the beginning
121
+ children.prepend(children.pop)
161
122
  end
162
123
  end
@@ -8,7 +8,8 @@ module ONCCertificationG10TestKit
8
8
  smart-app-launch guide. All scopes requested are expected to be granted.
9
9
  )
10
10
  id :g10_smart_scopes
11
- input :requested_scopes, :received_scopes
11
+ input :smart_auth_info, type: 'auth_info'
12
+ input :received_scopes
12
13
  uses_request :token
13
14
 
14
15
  VALID_RESOURCE_TYPES = [
@@ -95,6 +96,10 @@ module ONCCertificationG10TestKit
95
96
  VALID_RESOURCE_TYPES
96
97
  end
97
98
 
99
+ def requested_scopes
100
+ smart_auth_info.requested_scopes
101
+ end
102
+
98
103
  def required_scope_type
99
104
  config.options[:required_scope_type]
100
105
  end
@@ -1,5 +1,6 @@
1
1
  require_relative 'base_token_refresh_group'
2
2
  require_relative 'patient_context_test'
3
+ require_relative 'scope_constants'
3
4
  require_relative 'smart_invalid_token_refresh_test'
4
5
  require_relative 'smart_scopes_test'
5
6
  require_relative 'unauthorized_access_test'
@@ -9,6 +10,8 @@ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
9
10
 
10
11
  module ONCCertificationG10TestKit
11
12
  class SmartStandalonePatientAppGroup < Inferno::TestGroup
13
+ include ScopeConstants
14
+
12
15
  title 'Standalone Patient App - Full Access'
13
16
  short_title 'Standalone Patient App'
14
17
 
@@ -56,26 +59,41 @@ module ONCCertificationG10TestKit
56
59
 
57
60
  config(
58
61
  inputs: {
59
- client_secret: {
60
- optional: false,
61
- name: :standalone_client_secret
62
+ smart_auth_info: {
63
+ name: :standalone_smart_auth_info,
64
+ title: 'Standalone Launch Credentials',
65
+ options: {
66
+ mode: 'auth',
67
+ components: [
68
+ {
69
+ name: :auth_type,
70
+ default: 'symmetric',
71
+ locked: true
72
+ },
73
+ {
74
+ name: :auth_request_method,
75
+ default: 'GET',
76
+ locked: true
77
+ },
78
+ {
79
+ name: :use_discovery,
80
+ locked: true
81
+ }
82
+ ]
83
+ }
62
84
  }
63
85
  }
64
86
  )
65
87
 
66
- input_order :url,
67
- :standalone_client_id,
68
- :standalone_client_secret,
69
- :standalone_requested_scopes,
70
- :use_pkce,
71
- :pkce_code_challenge_method,
72
- :standalone_authorization_method,
73
- :client_auth_type,
74
- :client_auth_encryption_method
75
-
76
88
  group from: :smart_discovery do
77
89
  required_suite_options(G10Options::SMART_1_REQUIREMENT)
78
90
 
91
+ config(
92
+ outputs: {
93
+ smart_auth_info: { name: :standalone_smart_auth_info }
94
+ }
95
+ )
96
+
79
97
  test from: 'g10_smart_well_known_capabilities',
80
98
  config: {
81
99
  options: {
@@ -121,6 +139,12 @@ module ONCCertificationG10TestKit
121
139
  group from: :smart_discovery_stu2 do
122
140
  required_suite_options(G10Options::SMART_2_REQUIREMENT)
123
141
 
142
+ config(
143
+ outputs: {
144
+ smart_auth_info: { name: :standalone_smart_auth_info }
145
+ }
146
+ )
147
+
124
148
  test from: 'g10_smart_well_known_capabilities',
125
149
  config: {
126
150
  options: {
@@ -143,6 +167,13 @@ module ONCCertificationG10TestKit
143
167
 
144
168
  group from: :smart_discovery_stu2_2 do # rubocop:disable Naming/VariableNumber
145
169
  required_suite_options(G10Options::SMART_2_2_REQUIREMENT)
170
+
171
+ config(
172
+ outputs: {
173
+ smart_auth_info: { name: :standalone_smart_auth_info }
174
+ }
175
+ )
176
+
146
177
  test from: 'g10_smart_well_known_capabilities',
147
178
  config: {
148
179
  options: {
@@ -194,19 +225,16 @@ module ONCCertificationG10TestKit
194
225
 
195
226
  config(
196
227
  inputs: {
197
- requested_scopes: {
198
- default: %(
199
- launch/patient openid fhirUser offline_access
200
- patient/Medication.read patient/AllergyIntolerance.read
201
- patient/CarePlan.read patient/CareTeam.read patient/Condition.read
202
- patient/Device.read patient/DiagnosticReport.read
203
- patient/DocumentReference.read patient/Encounter.read
204
- patient/Goal.read patient/Immunization.read patient/Location.read
205
- patient/MedicationRequest.read patient/Observation.read
206
- patient/Organization.read patient/Patient.read
207
- patient/Practitioner.read patient/Procedure.read
208
- patient/Provenance.read patient/PractitionerRole.read
209
- ).gsub(/\s{2,}/, ' ').strip
228
+ smart_auth_info: {
229
+ name: :standalone_smart_auth_info,
230
+ options: {
231
+ components: [
232
+ {
233
+ name: :requested_scopes,
234
+ default: STANDALONE_SMART_1_SCOPES
235
+ }
236
+ ]
237
+ }
210
238
  }
211
239
  }
212
240
  )
@@ -214,7 +242,6 @@ module ONCCertificationG10TestKit
214
242
  test from: :g10_smart_scopes do
215
243
  config(
216
244
  inputs: {
217
- requested_scopes: { name: :standalone_requested_scopes },
218
245
  received_scopes: { name: :standalone_received_scopes }
219
246
  },
220
247
  options: {
@@ -236,7 +263,7 @@ module ONCCertificationG10TestKit
236
263
  config: {
237
264
  inputs: {
238
265
  patient_id: { name: :standalone_patient_id },
239
- smart_credentials: { name: :standalone_smart_credentials }
266
+ smart_auth_info: { name: :standalone_smart_auth_info }
240
267
  }
241
268
  }
242
269
 
@@ -257,27 +284,7 @@ module ONCCertificationG10TestKit
257
284
  )
258
285
  end
259
286
 
260
- group from: :smart_standalone_launch_stu2,
261
- config: {
262
- inputs: {
263
- use_pkce: {
264
- default: 'true',
265
- locked: true
266
- },
267
- pkce_code_challenge_method: {
268
- locked: true
269
- },
270
- authorization_method: {
271
- name: :standalone_authorization_method,
272
- default: 'get',
273
- locked: true
274
- },
275
- client_auth_type: {
276
- locked: true,
277
- default: 'confidential_symmetric'
278
- }
279
- }
280
- } do
287
+ group from: :smart_standalone_launch_stu2 do
281
288
  required_suite_options(G10Options::SMART_2_REQUIREMENT)
282
289
 
283
290
  title 'Standalone Launch With Patient Scope'
@@ -308,19 +315,16 @@ module ONCCertificationG10TestKit
308
315
 
309
316
  config(
310
317
  inputs: {
311
- requested_scopes: {
312
- default: %(
313
- launch/patient openid fhirUser offline_access
314
- patient/Medication.rs patient/AllergyIntolerance.rs
315
- patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs
316
- patient/Device.rs patient/DiagnosticReport.rs
317
- patient/DocumentReference.rs patient/Encounter.rs
318
- patient/Goal.rs patient/Immunization.rs patient/Location.rs
319
- patient/MedicationRequest.rs patient/Observation.rs
320
- patient/Organization.rs patient/Patient.rs
321
- patient/Practitioner.rs patient/Procedure.rs
322
- patient/Provenance.rs patient/PractitionerRole.rs
323
- ).gsub(/\s{2,}/, ' ').strip
318
+ smart_auth_info: {
319
+ name: :standalone_smart_auth_info,
320
+ options: {
321
+ components: [
322
+ {
323
+ name: :requested_scopes,
324
+ default: STANDALONE_SMART_2_SCOPES
325
+ }
326
+ ]
327
+ }
324
328
  }
325
329
  }
326
330
  )
@@ -350,7 +354,7 @@ module ONCCertificationG10TestKit
350
354
  config: {
351
355
  inputs: {
352
356
  patient_id: { name: :standalone_patient_id },
353
- smart_credentials: { name: :standalone_smart_credentials }
357
+ smart_auth_info: { name: :standalone_smart_auth_info }
354
358
  }
355
359
  }
356
360
 
@@ -371,27 +375,7 @@ module ONCCertificationG10TestKit
371
375
  )
372
376
  end
373
377
 
374
- group from: :smart_standalone_launch_stu2_2, # rubocop:disable Naming/VariableNumber
375
- config: {
376
- inputs: {
377
- use_pkce: {
378
- default: 'true',
379
- locked: true
380
- },
381
- pkce_code_challenge_method: {
382
- locked: true
383
- },
384
- authorization_method: {
385
- name: :standalone_authorization_method,
386
- default: 'get',
387
- locked: true
388
- },
389
- client_auth_type: {
390
- locked: true,
391
- default: 'confidential_symmetric'
392
- }
393
- }
394
- } do
378
+ group from: :smart_standalone_launch_stu2_2 do # rubocop:disable Naming/VariableNumber
395
379
  required_suite_options(G10Options::SMART_2_2_REQUIREMENT)
396
380
  title 'Standalone Launch With Patient Scope'
397
381
  description %(
@@ -421,19 +405,16 @@ module ONCCertificationG10TestKit
421
405
 
422
406
  config(
423
407
  inputs: {
424
- requested_scopes: {
425
- default: %(
426
- launch/patient openid fhirUser offline_access
427
- patient/Medication.rs patient/AllergyIntolerance.rs
428
- patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs
429
- patient/Device.rs patient/DiagnosticReport.rs
430
- patient/DocumentReference.rs patient/Encounter.rs
431
- patient/Goal.rs patient/Immunization.rs patient/Location.rs
432
- patient/MedicationRequest.rs patient/Observation.rs
433
- patient/Organization.rs patient/Patient.rs
434
- patient/Practitioner.rs patient/Procedure.rs
435
- patient/Provenance.rs patient/PractitionerRole.rs
436
- ).gsub(/\s{2,}/, ' ').strip
408
+ smart_auth_info: {
409
+ name: :standalone_smart_auth_info,
410
+ options: {
411
+ components: [
412
+ {
413
+ name: :requested_scopes,
414
+ default: STANDALONE_SMART_2_SCOPES
415
+ }
416
+ ]
417
+ }
437
418
  }
438
419
  }
439
420
  )
@@ -463,7 +444,7 @@ module ONCCertificationG10TestKit
463
444
  config: {
464
445
  inputs: {
465
446
  patient_id: { name: :standalone_patient_id },
466
- smart_credentials: { name: :standalone_smart_credentials }
447
+ smart_auth_info: { name: :standalone_smart_auth_info }
467
448
  }
468
449
  }
469
450
 
@@ -489,9 +470,7 @@ module ONCCertificationG10TestKit
489
470
  config: {
490
471
  inputs: {
491
472
  id_token: { name: :standalone_id_token },
492
- client_id: { name: :standalone_client_id },
493
- requested_scopes: { name: :standalone_requested_scopes },
494
- smart_credentials: { name: :standalone_smart_credentials }
473
+ smart_auth_info: { name: :standalone_smart_auth_info }
495
474
  }
496
475
  }
497
476
 
@@ -501,9 +480,7 @@ module ONCCertificationG10TestKit
501
480
  config: {
502
481
  inputs: {
503
482
  id_token: { name: :standalone_id_token },
504
- client_id: { name: :standalone_client_id },
505
- requested_scopes: { name: :standalone_requested_scopes },
506
- smart_credentials: { name: :standalone_smart_credentials }
483
+ smart_auth_info: { name: :standalone_smart_auth_info }
507
484
  }
508
485
  }
509
486
 
@@ -512,9 +489,7 @@ module ONCCertificationG10TestKit
512
489
  config: {
513
490
  inputs: {
514
491
  id_token: { name: :standalone_id_token },
515
- client_id: { name: :standalone_client_id },
516
- requested_scopes: { name: :standalone_requested_scopes },
517
- smart_credentials: { name: :standalone_smart_credentials }
492
+ smart_auth_info: { name: :standalone_smart_auth_info }
518
493
  }
519
494
  }
520
495
 
@@ -523,9 +498,6 @@ module ONCCertificationG10TestKit
523
498
 
524
499
  config(
525
500
  inputs: {
526
- refresh_token: { name: :standalone_refresh_token },
527
- client_id: { name: :standalone_client_id },
528
- client_secret: { name: :standalone_client_secret },
529
501
  received_scopes: { name: :standalone_received_scopes }
530
502
  },
531
503
  outputs: {
@@ -534,7 +506,7 @@ module ONCCertificationG10TestKit
534
506
  access_token: { name: :standalone_access_token },
535
507
  token_retrieval_time: { name: :standalone_token_retrieval_time },
536
508
  expires_in: { name: :standalone_expires_in },
537
- smart_credentials: { name: :standalone_smart_credentials }
509
+ smart_auth_info: { name: :standalone_smart_auth_info }
538
510
  }
539
511
  )
540
512
 
@@ -542,7 +514,7 @@ module ONCCertificationG10TestKit
542
514
  config(
543
515
  inputs: {
544
516
  patient_id: { name: :standalone_patient_id },
545
- smart_credentials: { name: :standalone_smart_credentials }
517
+ smart_auth_info: { name: :standalone_smart_auth_info }
546
518
  },
547
519
  options: {
548
520
  refresh_test: true
@@ -559,7 +531,7 @@ module ONCCertificationG10TestKit
559
531
  inputs: {
560
532
  received_scopes: { name: :standalone_received_scopes },
561
533
  patient_id: { name: :standalone_patient_id },
562
- smart_credentials: { name: :standalone_smart_credentials }
534
+ smart_auth_info: { name: :standalone_smart_auth_info }
563
535
  }
564
536
  }
565
537
 
@@ -567,12 +539,12 @@ module ONCCertificationG10TestKit
567
539
  id :g10_standalone_credentials_export
568
540
  title 'Set SMART Credentials to Standalone Launch Credentials'
569
541
 
570
- input :standalone_smart_credentials, type: :oauth_credentials
542
+ input :standalone_smart_auth_info, type: :auth_info
571
543
  input :standalone_patient_id
572
- output :smart_credentials, :patient_id
544
+ output :smart_auth_info, :patient_id
573
545
 
574
546
  run do
575
- output smart_credentials: standalone_smart_credentials.to_s,
547
+ output smart_auth_info: standalone_smart_auth_info.to_s,
576
548
  patient_id: standalone_patient_id
577
549
  end
578
550
  end