smart_app_launch_test_kit 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c85e63b5e23ff0a1021d234660b3878bb14887b5ba3b5fce05ee40f3071bcd28
4
- data.tar.gz: 962ce6ee409f408ad79093bf424654c0532d741c03666c7902dfb6e5dea93eb8
3
+ metadata.gz: 432f7623257c9c41b832c51c415a1d77841b80048c27bb5b7ee51a485490abf9
4
+ data.tar.gz: 18c0b77e1b6d2d756cb7ce8a6032e8193ca021c71ba9dab4349bca8c0469a716
5
5
  SHA512:
6
- metadata.gz: '0491bd7e512cf0c81953e6f3a536bb6f2a0b9a955e7c451b8d3efe85a3d90b1326b54d5846ef3eaa0db5115c89b47326183a56081b4087c739c9ecb10bc4e291'
7
- data.tar.gz: 10c44261afccf1796a06e3add398dbfa3fcca441364bb7f193afebbe60f120eb6c2c44b3dcd146fe4d0c0ba28a2d5c00a822f2999fb25abd4c8eb2844a08e34a
6
+ metadata.gz: 2e86b89292cc42beb88fa7e03eb282d9aacc4dfeb243c0dba670ecd254ede17b886c011cdaca26d9b53b72177337a5d287f72364689dca8c2e7fa18a8df7d950
7
+ data.tar.gz: 1a1acec6874cbae68f56201edf2ed33890ec5bf373a3ea77c2ed3ffe4524c240f3a69e91c701deda3d21a5307daa409510ea7220045de9de917e3cb181fcbe4a
@@ -17,7 +17,7 @@
17
17
  "optional": true,
18
18
  "title": "SMART App Launch URL(s)",
19
19
  "type": "textarea",
20
- "value": "http://localhost:4567/custom/smart_stu2_2/launch"
20
+ "value": "<%= Inferno::Application['base_url'] %>/custom/smart_stu2_2/launch"
21
21
  },
22
22
  {
23
23
  "name": "smart_redirect_uris",
@@ -25,7 +25,7 @@
25
25
  "optional": true,
26
26
  "title": "SMART App Launch Redirect URI(s)",
27
27
  "type": "textarea",
28
- "value": "http://localhost:4567/custom/smart_stu2_2/redirect"
28
+ "value": "<%= Inferno::Application['base_url'] %>/custom/smart_stu2_2/redirect"
29
29
  },
30
30
  {
31
31
  "name": "smart_jwk_set",
@@ -33,7 +33,7 @@
33
33
  "optional": true,
34
34
  "title": "SMART Confidential Asymmetric JSON Web Key Set (JWKS)",
35
35
  "type": "textarea",
36
- "value": "http://localhost:4567/custom/smart_stu2_2/.well-known/jwks.json"
36
+ "value": "<%= Inferno::Application['base_url'] %>/custom/smart_stu2_2/.well-known/jwks.json"
37
37
  },
38
38
  {
39
39
  "name": "smart_client_secret",
@@ -52,7 +52,7 @@ at a minimum by the tester to execute any tests in this suite:
52
52
  A comma-separated list of one or more URIs that the app will sepcify as the target
53
53
  of the redirect for Inferno to use when providing the authorization code.
54
54
  - **SMART Confidential Symmetric Client Secret** (required for the *SMART App Launch Confidential
55
- Symmetric* clients only)): The client secret that the confidential symmetric client will send with
55
+ Symmetric* clients only): The client secret that the confidential symmetric client will send with
56
56
  token requests to authenticate the client to Inferno.
57
57
  - **SMART JSON Web Key Set (JWKS)** (required for *Confidential Asymmetric* clients): The SMART
58
58
  client's public JSON Web Key Set including key(s) that Inferno will use to verify the signature
@@ -23,13 +23,13 @@ module SMARTAppLaunch
23
23
  end
24
24
 
25
25
  def make_response
26
+ return make_smart_client_credential_token_response if request.params[:grant_type] == CLIENT_CREDENTIALS_TAG
27
+
26
28
  suite_options_list = Inferno::Repositories::TestSessions.new.find(result.test_session_id)&.suite_options
27
29
  suite_options_hash = suite_options_list&.map { |option| [option.id, option.value] }&.to_h
28
30
  smart_authentication_approach = SMARTClientOptions.smart_authentication_approach(suite_options_hash)
29
31
 
30
32
  case request.params[:grant_type]
31
- when CLIENT_CREDENTIALS_TAG
32
- make_smart_client_credential_token_response
33
33
  when AUTHORIZATION_CODE_TAG
34
34
  make_smart_authorization_code_token_response(smart_authentication_approach)
35
35
  when REFRESH_TOKEN_TAG
@@ -78,7 +78,7 @@ module SMARTAppLaunch
78
78
  return unless token_to_decode.present?
79
79
 
80
80
  JSON.parse(Base64.urlsafe_decode64(token_to_decode))
81
- rescue JSON::ParserError
81
+ rescue StandardError
82
82
  nil
83
83
  end
84
84
 
@@ -119,7 +119,7 @@ module SMARTAppLaunch
119
119
  begin
120
120
  JSON.parse(retrieved.body)
121
121
  rescue JSON::ParserError
122
- warning_messages << "Failed to fetch valid json from jwks uri #{jwk_set}."
122
+ warning_messages << "Failed to fetch valid json from jwks uri #{jku}."
123
123
  nil
124
124
  end
125
125
  else
@@ -163,7 +163,7 @@ module SMARTAppLaunch
163
163
  response.format = :json
164
164
  response.body = FHIR::OperationOutcome.new(
165
165
  issue: FHIR::OperationOutcome::Issue.new(severity: 'fatal', code: 'expired',
166
- details: FHIR::CodeableConcept.new(text: "#{type}has expired"))
166
+ details: FHIR::CodeableConcept.new(text: "#{type} has expired"))
167
167
  ).to_json
168
168
  end
169
169
 
@@ -1,4 +1,4 @@
1
1
  module SMARTAppLaunch
2
- VERSION = '0.6.2'.freeze
3
- LAST_UPDATED = '2025-05-02'.freeze
2
+ VERSION = '0.6.3'.freeze
3
+ LAST_UPDATED = '2025-05-13'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_app_launch_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-02 00:00:00.000000000 Z
11
+ date: 2025-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core