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 SMARTInvalidTokenGroup < Inferno::TestGroup
5
+ include ScopeConstants
6
+
3
7
  title 'Invalid Access Token Request'
4
8
  short_title 'Invalid Token Request'
5
9
  input_instructions %(
@@ -22,78 +26,34 @@ module ONCCertificationG10TestKit
22
26
  id :g10_smart_invalid_token_request
23
27
  run_as_group
24
28
 
25
- input :use_pkce,
26
- title: 'Proof Key for Code Exchange (PKCE)',
27
- type: 'radio',
28
- default: 'false',
29
+ config(
30
+ inputs: {
31
+ smart_auth_info: {
32
+ name: :standalone_smart_auth_info,
33
+ title: 'Standalone Launch Credentials',
29
34
  options: {
30
- list_options: [
35
+ mode: 'auth',
36
+ components: [
31
37
  {
32
- label: 'Enabled',
33
- value: 'true'
38
+ name: :requested_scopes,
39
+ default: STANDALONE_SMART_1_SCOPES
34
40
  },
35
41
  {
36
- label: 'Disabled',
37
- value: 'false'
38
- }
39
- ]
40
- }
41
- input :pkce_code_challenge_method,
42
- optional: true,
43
- title: 'PKCE Code Challenge Method',
44
- type: 'radio',
45
- default: 'S256',
46
- options: {
47
- list_options: [
42
+ name: :auth_type,
43
+ default: 'symmetric',
44
+ locked: true
45
+ },
48
46
  {
49
- label: 'S256',
50
- value: 'S256'
47
+ name: :auth_request_method,
48
+ default: 'GET',
49
+ locked: true
51
50
  },
52
51
  {
53
- label: 'plain',
54
- value: 'plain'
52
+ name: :use_discovery,
53
+ locked: true
55
54
  }
56
55
  ]
57
56
  }
58
-
59
- input_order :url,
60
- :standalone_client_id,
61
- :standalone_client_secret,
62
- :standalone_requested_scopes,
63
- :use_pkce,
64
- :pkce_code_challenge_method,
65
- :smart_authorization_url,
66
- :smart_token_url
67
-
68
- config(
69
- inputs: {
70
- client_id: {
71
- name: :standalone_client_id,
72
- title: 'Standalone Client ID',
73
- description: 'Client ID provided during registration of Inferno as a standalone application'
74
- },
75
- client_secret: {
76
- name: :standalone_client_secret,
77
- title: 'Standalone Client Secret',
78
- description: 'Client Secret provided during registration of Inferno as a standalone application'
79
- },
80
- requested_scopes: {
81
- name: :standalone_requested_scopes,
82
- title: 'Standalone Scope',
83
- description: 'OAuth 2.0 scope provided by system to enable all required functionality',
84
- type: 'textarea',
85
- default: %(
86
- launch/patient openid fhirUser offline_access
87
- patient/Medication.read patient/AllergyIntolerance.read
88
- patient/CarePlan.read patient/CareTeam.read patient/Condition.read
89
- patient/Device.read patient/DiagnosticReport.read
90
- patient/DocumentReference.read patient/Encounter.read
91
- patient/Goal.read patient/Immunization.read patient/Location.read
92
- patient/MedicationRequest.read patient/Observation.read
93
- patient/Organization.read patient/Patient.read
94
- patient/Practitioner.read patient/Procedure.read
95
- patient/Provenance.read patient/PractitionerRole.read
96
- ).gsub(/\s{2,}/, ' ').strip
97
57
  },
98
58
  url: {
99
59
  title: 'Standalone FHIR Endpoint',
@@ -105,14 +65,6 @@ module ONCCertificationG10TestKit
105
65
  state: {
106
66
  name: :invalid_token_state
107
67
  },
108
- smart_authorization_url: {
109
- title: 'OAuth 2.0 Authorize Endpoint',
110
- description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
111
- },
112
- smart_token_url: {
113
- title: 'OAuth 2.0 Token Endpoint',
114
- description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
115
- },
116
68
  pkce_code_verifier: {
117
69
  name: :invalid_token_pkce_code_verifier
118
70
  }
@@ -121,7 +73,8 @@ module ONCCertificationG10TestKit
121
73
  code: { name: :invalid_token_code },
122
74
  state: { name: :invalid_token_state },
123
75
  expires_in: { name: :invalid_token_expires_in },
124
- pkce_code_verifier: { name: :invalid_token_pkce_code_verifier }
76
+ pkce_code_verifier: { name: :invalid_token_pkce_code_verifier },
77
+ smart_auth_info: { name: :standalone_smart_auth_info }
125
78
  },
126
79
  requests: {
127
80
  redirect: { name: :invalid_token_redirect },
@@ -129,10 +82,13 @@ module ONCCertificationG10TestKit
129
82
  }
130
83
  )
131
84
 
85
+ test from: :well_known_endpoint
86
+
132
87
  test from: :smart_app_redirect
133
88
  test from: :smart_code_received
134
89
 
135
90
  test do
91
+ id 'Test03'
136
92
  title ' OAuth token exchange fails when supplied invalid code'
137
93
  description %(
138
94
  If the request failed verification or is invalid, the authorization
@@ -140,9 +96,8 @@ module ONCCertificationG10TestKit
140
96
  )
141
97
  uses_request :redirect
142
98
 
143
- input :use_pkce, :client_id, :client_secret, :smart_token_url
144
- input :pkce_code_verifier,
145
- optional: true
99
+ input :smart_auth_info, type: :auth_info
100
+ input :pkce_code_verifier, optional: true
146
101
 
147
102
  run do
148
103
  skip_if request.query_parameters['error'].present?, 'Error during authorization request'
@@ -154,22 +109,23 @@ module ONCCertificationG10TestKit
154
109
  }
155
110
  oauth2_headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
156
111
 
157
- if client_secret.present?
158
- client_credentials = "#{client_id}:#{client_secret}"
112
+ if smart_auth_info.symmetric_auth?
113
+ client_credentials = "#{smart_auth_info.client_id}:#{smart_auth_info.client_secret}"
159
114
  oauth2_headers['Authorization'] = "Basic #{Base64.strict_encode64(client_credentials)}"
160
115
  else
161
- oauth2_params[:client_id] = client_id
116
+ oauth2_params[:client_id] = smart_auth_info.client_id
162
117
  end
163
118
 
164
- oauth2_params[:code_verifier] = pkce_code_verifier if use_pkce == 'true'
119
+ oauth2_params[:code_verifier] = pkce_code_verifier if smart_auth_info.pkce_enabled?
165
120
 
166
- post(smart_token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
121
+ post(smart_auth_info.token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
167
122
 
168
123
  assert_response_status(400)
169
124
  end
170
125
  end
171
126
 
172
127
  test do
128
+ id 'Test04'
173
129
  title 'OAuth token exchange fails when supplied invalid client ID'
174
130
  description %(
175
131
  If the request failed verification or is invalid, the authorization
@@ -177,9 +133,9 @@ module ONCCertificationG10TestKit
177
133
  )
178
134
  uses_request :redirect
179
135
 
180
- input :use_pkce, :code, :smart_token_url, :client_secret
181
- input :pkce_code_verifier,
182
- optional: true
136
+ input :smart_auth_info, type: :auth_info
137
+ input :code
138
+ input :pkce_code_verifier, optional: true
183
139
 
184
140
  run do
185
141
  skip_if request.query_parameters['error'].present?, 'Error during authorization request'
@@ -193,16 +149,16 @@ module ONCCertificationG10TestKit
193
149
  }
194
150
  oauth2_headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
195
151
 
196
- if client_secret.present?
197
- client_credentials = "#{client_id}:#{client_secret}"
152
+ if smart_auth_info.symmetric_auth?
153
+ client_credentials = "#{client_id}:#{smart_auth_info.client_secret}"
198
154
  oauth2_headers['Authorization'] = "Basic #{Base64.strict_encode64(client_credentials)}"
199
155
  else
200
156
  oauth2_params[:client_id] = client_id
201
157
  end
202
158
 
203
- oauth2_params[:code_verifier] = pkce_code_verifier if use_pkce == 'true'
159
+ oauth2_params[:code_verifier] = pkce_code_verifier if smart_auth_info.pkce_enabled?
204
160
 
205
- post(smart_token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
161
+ post(smart_auth_info.token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
206
162
 
207
163
  assert_response_status([400, 401])
208
164
  end
@@ -1,5 +1,9 @@
1
+ require_relative 'scope_constants'
2
+
1
3
  module ONCCertificationG10TestKit
2
4
  class SMARTInvalidTokenGroupSTU2 < Inferno::TestGroup
5
+ include ScopeConstants
6
+
3
7
  title 'Invalid Access Token Request'
4
8
  short_title 'Invalid Token Request'
5
9
  input_instructions %(
@@ -22,80 +26,44 @@ module ONCCertificationG10TestKit
22
26
  id :g10_smart_invalid_token_request_stu2
23
27
  run_as_group
24
28
 
25
- input :use_pkce,
26
- title: 'Proof Key for Code Exchange (PKCE)',
27
- type: 'radio',
28
- default: 'true',
29
- locked: true,
29
+ config(
30
+ inputs: {
31
+ smart_auth_info: {
32
+ name: :standalone_smart_auth_info,
33
+ title: 'Standalone Launch Credentials',
30
34
  options: {
31
- list_options: [
35
+ mode: 'auth',
36
+ components: [
32
37
  {
33
- label: 'Enabled',
34
- value: 'true'
38
+ name: :requested_scopes,
39
+ default: STANDALONE_SMART_1_SCOPES
35
40
  },
36
41
  {
37
- label: 'Disabled',
38
- value: 'false'
39
- }
40
- ]
41
- }
42
- input :pkce_code_challenge_method,
43
- optional: true,
44
- title: 'PKCE Code Challenge Method',
45
- type: 'radio',
46
- default: 'S256',
47
- locked: true,
48
- options: {
49
- list_options: [
42
+ name: :auth_type,
43
+ default: 'symmetric',
44
+ locked: true
45
+ },
46
+ {
47
+ name: :auth_request_method,
48
+ default: 'GET',
49
+ locked: true
50
+ },
51
+ {
52
+ name: :use_discovery,
53
+ locked: true
54
+ },
50
55
  {
51
- label: 'S256',
52
- value: 'S256'
56
+ name: :pkce_support,
57
+ default: 'enabled',
58
+ locked: true
53
59
  },
54
60
  {
55
- label: 'Plain',
56
- value: 'plain'
61
+ name: :pkce_code_challenge_method,
62
+ default: 'S256',
63
+ locked: true
57
64
  }
58
65
  ]
59
66
  }
60
-
61
- input_order :url,
62
- :standalone_client_id,
63
- :standalone_client_secret,
64
- :standalone_requested_scopes,
65
- :use_pkce,
66
- :pkce_code_challenge_method,
67
- :smart_authorization_url,
68
- :smart_token_url
69
-
70
- config(
71
- inputs: {
72
- client_id: {
73
- name: :standalone_client_id,
74
- title: 'Standalone Client ID',
75
- description: 'Client ID provided during registration of Inferno as a standalone application'
76
- },
77
- client_secret: {
78
- name: :standalone_client_secret,
79
- title: 'Standalone Client Secret',
80
- description: 'Client Secret provided during registration of Inferno as a standalone application'
81
- },
82
- requested_scopes: {
83
- name: :standalone_requested_scopes,
84
- title: 'Standalone Scope',
85
- description: 'OAuth 2.0 scope provided by system to enable all required functionality',
86
- type: 'textarea',
87
- default: %(
88
- launch/patient openid fhirUser offline_access
89
- patient/Medication.read patient/AllergyIntolerance.read
90
- patient/CarePlan.read patient/CareTeam.read patient/Condition.read
91
- patient/Device.read patient/DiagnosticReport.read
92
- patient/DocumentReference.read patient/Encounter.read
93
- patient/Goal.read patient/Immunization.read patient/Location.read
94
- patient/MedicationRequest.read patient/Observation.read
95
- patient/Organization.read patient/Patient.read
96
- patient/Practitioner.read patient/Procedure.read
97
- patient/Provenance.read patient/PractitionerRole.read
98
- ).gsub(/\s{2,}/, ' ').strip
99
67
  },
100
68
  url: {
101
69
  title: 'Standalone FHIR Endpoint',
@@ -107,27 +75,16 @@ module ONCCertificationG10TestKit
107
75
  state: {
108
76
  name: :invalid_token_state
109
77
  },
110
- smart_authorization_url: {
111
- title: 'OAuth 2.0 Authorize Endpoint',
112
- description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
113
- },
114
- smart_token_url: {
115
- title: 'OAuth 2.0 Token Endpoint',
116
- description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
117
- },
118
78
  pkce_code_verifier: {
119
79
  name: :invalid_token_pkce_code_verifier
120
- },
121
- client_auth_type: {
122
- locked: true,
123
- default: 'confidential_symmetric'
124
80
  }
125
81
  },
126
82
  outputs: {
127
83
  code: { name: :invalid_token_code },
128
84
  state: { name: :invalid_token_state },
129
85
  expires_in: { name: :invalid_token_expires_in },
130
- pkce_code_verifier: { name: :invalid_token_pkce_code_verifier }
86
+ pkce_code_verifier: { name: :invalid_token_pkce_code_verifier },
87
+ smart_auth_info: { name: :standalone_smart_auth_info }
131
88
  },
132
89
  requests: {
133
90
  redirect: { name: :invalid_token_redirect },
@@ -135,10 +92,13 @@ module ONCCertificationG10TestKit
135
92
  }
136
93
  )
137
94
 
95
+ test from: :well_known_endpoint
96
+
138
97
  test from: :smart_app_redirect_stu2
139
98
  test from: :smart_code_received
140
99
 
141
100
  test do
101
+ id 'Test03'
142
102
  title ' OAuth token exchange fails when supplied invalid code'
143
103
  description %(
144
104
  If the request failed verification or is invalid, the authorization
@@ -146,7 +106,7 @@ module ONCCertificationG10TestKit
146
106
  )
147
107
  uses_request :redirect
148
108
 
149
- input :use_pkce, :client_id, :client_secret, :smart_token_url
109
+ input :smart_auth_info, type: :auth_info
150
110
  input :pkce_code_verifier,
151
111
  optional: true
152
112
  run do
@@ -159,22 +119,23 @@ module ONCCertificationG10TestKit
159
119
  }
160
120
  oauth2_headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
161
121
 
162
- if client_secret.present?
163
- client_credentials = "#{client_id}:#{client_secret}"
122
+ if smart_auth_info.symmetric_auth?
123
+ client_credentials = "#{smart_auth_info.client_id}:#{smart_auth_info.client_secret}"
164
124
  oauth2_headers['Authorization'] = "Basic #{Base64.strict_encode64(client_credentials)}"
165
125
  else
166
- oauth2_params[:client_id] = client_id
126
+ oauth2_params[:client_id] = smart_auth_info.client_id
167
127
  end
168
128
 
169
- oauth2_params[:code_verifier] = pkce_code_verifier if use_pkce == 'true'
129
+ oauth2_params[:code_verifier] = pkce_code_verifier if smart_auth_info.pkce_enabled?
170
130
 
171
- post(smart_token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
131
+ post(smart_auth_info.token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
172
132
 
173
133
  assert_response_status(400)
174
134
  end
175
135
  end
176
136
 
177
137
  test do
138
+ id 'Test04'
178
139
  title 'OAuth token exchange fails when supplied invalid client ID'
179
140
  description %(
180
141
  If the request failed verification or is invalid, the authorization
@@ -182,7 +143,8 @@ module ONCCertificationG10TestKit
182
143
  )
183
144
  uses_request :redirect
184
145
 
185
- input :use_pkce, :code, :smart_token_url, :client_secret
146
+ input :code
147
+ input :smart_auth_info, type: :auth_info
186
148
  input :pkce_code_verifier,
187
149
  optional: true
188
150
 
@@ -198,16 +160,16 @@ module ONCCertificationG10TestKit
198
160
  }
199
161
  oauth2_headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
200
162
 
201
- if client_secret.present?
202
- client_credentials = "#{client_id}:#{client_secret}"
163
+ if smart_auth_info.symmetric_auth?
164
+ client_credentials = "#{client_id}:#{smart_auth_info.client_secret}"
203
165
  oauth2_headers['Authorization'] = "Basic #{Base64.strict_encode64(client_credentials)}"
204
166
  else
205
167
  oauth2_params[:client_id] = client_id
206
168
  end
207
169
 
208
- oauth2_params[:code_verifier] = pkce_code_verifier if use_pkce == 'true'
170
+ oauth2_params[:code_verifier] = pkce_code_verifier if smart_auth_info.pkce_enabled?
209
171
 
210
- post(smart_token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
172
+ post(smart_auth_info.token_url, body: oauth2_params, name: :token, headers: oauth2_headers)
211
173
 
212
174
  assert_response_status([400, 401])
213
175
  end
@@ -8,10 +8,13 @@ module ONCCertificationG10TestKit
8
8
 
9
9
  [OAuth 2.0 RFC (6749)](https://www.rfc-editor.org/rfc/rfc6749#section-6)
10
10
  )
11
- input :refresh_token, :smart_token_url, :client_id, :received_scopes
12
- input :client_secret, optional: true
11
+ input :smart_auth_info, type: 'auth_info'
12
+ input :received_scopes
13
13
 
14
14
  run do
15
+ skip_if smart_auth_info.refresh_token.blank?,
16
+ 'No refresh token was received'
17
+
15
18
  oauth2_params = {
16
19
  'grant_type' => 'refresh_token',
17
20
  'refresh_token' => SecureRandom.uuid
@@ -20,14 +23,14 @@ module ONCCertificationG10TestKit
20
23
 
21
24
  oauth2_params['scope'] = received_scopes if config.options[:include_scopes]
22
25
 
23
- if client_secret.present?
24
- credentials = Base64.strict_encode64("#{client_id}:#{client_secret}")
26
+ if smart_auth_info.symmetric_auth?
27
+ credentials = Base64.strict_encode64("#{smart_auth_info.client_id}:#{smart_auth_info.client_secret}")
25
28
  oauth2_headers['Authorization'] = "Basic #{credentials}"
26
29
  else
27
- oauth2_params['client_id'] = client_id
30
+ oauth2_params['client_id'] = smart_auth_info.client_id
28
31
  end
29
32
 
30
- post(smart_token_url, body: oauth2_params, headers: oauth2_headers)
33
+ post(smart_auth_info.token_url, body: oauth2_params, headers: oauth2_headers)
31
34
 
32
35
  assert_response_status([400, 401])
33
36
  end