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 +4 -4
- data/config/presets/SMART_RunClientAgainstServer.json.erb +3 -3
- data/lib/smart_app_launch/docs/smart_stu2_2_client_suite_description.md +1 -1
- data/lib/smart_app_launch/endpoints/mock_smart_server/token_endpoint.rb +2 -2
- data/lib/smart_app_launch/endpoints/mock_smart_server.rb +3 -3
- data/lib/smart_app_launch/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 432f7623257c9c41b832c51c415a1d77841b80048c27bb5b7ee51a485490abf9
|
4
|
+
data.tar.gz: 18c0b77e1b6d2d756cb7ce8a6032e8193ca021c71ba9dab4349bca8c0469a716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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": "
|
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": "
|
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": "
|
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)
|
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
|
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 #{
|
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
|
|
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.
|
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-
|
11
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|