smart_app_launch_test_kit 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a14d093cf196c859d9bd49859172a6e51c9ba7c7237ea6694209a94a31c3da2
|
4
|
+
data.tar.gz: 367b7114290c9e74f1248998be1738c61b5023359a43961810529a0ad0cbe003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11037431b4204f6243b063c6b70d7e8a6cd279f63651a73200a6dd34b3f383437ae310c5557a0db68ed39e54470d7edfa514ac49399436e47aa863f9c41de9c9
|
7
|
+
data.tar.gz: f924de9a01098def4a73a06693e9b03b5821f8b3035bc315cd128f26249c17fbcd3af943a62094ecbc18c0aa6f0f12e771f304938aa64d24f77d85c80232b828
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative 'well_known_capabilities_stu1_test'
|
2
2
|
require_relative 'well_known_endpoint_test'
|
3
|
+
require_relative 'url_helpers'
|
3
4
|
|
4
5
|
module SMARTAppLaunch
|
5
6
|
class DiscoverySTU1Group < Inferno::TestGroup
|
@@ -45,6 +46,8 @@ module SMARTAppLaunch
|
|
45
46
|
id: 'Test02'
|
46
47
|
|
47
48
|
test do
|
49
|
+
include URLHelpers
|
50
|
+
|
48
51
|
title 'Conformance/CapabilityStatement provides OAuth 2.0 endpoints'
|
49
52
|
description %(
|
50
53
|
If a server requires SMART on FHIR authorization for access, its
|
@@ -88,8 +91,10 @@ module SMARTAppLaunch
|
|
88
91
|
|
89
92
|
oauth_extension_urls = ['authorize', 'introspect', 'manage', 'register', 'revoke', 'token']
|
90
93
|
|
94
|
+
base_url = "#{url.chomp('/')}/"
|
91
95
|
oauth_urls = oauth_extension_urls.each_with_object({}) do |url, urls|
|
92
96
|
urls[url] = smart_extension.extension.find { |extension| extension.url == url }&.valueUri
|
97
|
+
urls[url] = make_url_absolute(base_url, urls[url])
|
93
98
|
end
|
94
99
|
|
95
100
|
output capability_authorization_url: oauth_urls['authorize'],
|
@@ -1,5 +1,9 @@
|
|
1
|
+
require_relative 'url_helpers'
|
2
|
+
|
1
3
|
module SMARTAppLaunch
|
2
4
|
class WellKnownEndpointTest < Inferno::Test
|
5
|
+
include URLHelpers
|
6
|
+
|
3
7
|
title 'FHIR server makes SMART configuration available from well-known endpoint'
|
4
8
|
id :well_known_endpoint
|
5
9
|
description %(
|
@@ -27,14 +31,16 @@ module SMARTAppLaunch
|
|
27
31
|
|
28
32
|
assert_valid_json(request.response_body)
|
29
33
|
|
34
|
+
base_url = "#{url.chomp('/')}/"
|
30
35
|
config = JSON.parse(request.response_body)
|
36
|
+
|
31
37
|
output well_known_configuration: request.response_body,
|
32
|
-
well_known_authorization_url: config['authorization_endpoint'],
|
33
|
-
well_known_introspection_url: config['introspection_endpoint'],
|
34
|
-
well_known_management_url: config['management_endpoint'],
|
35
|
-
well_known_registration_url: config['registration_endpoint'],
|
36
|
-
well_known_revocation_url: config['revocation_endpoint'],
|
37
|
-
well_known_token_url: config['token_endpoint']
|
38
|
+
well_known_authorization_url: make_url_absolute(base_url, config['authorization_endpoint']),
|
39
|
+
well_known_introspection_url: make_url_absolute(base_url, config['introspection_endpoint']),
|
40
|
+
well_known_management_url: make_url_absolute(base_url, config['management_endpoint']),
|
41
|
+
well_known_registration_url: make_url_absolute(base_url, config['registration_endpoint']),
|
42
|
+
well_known_revocation_url: make_url_absolute(base_url, config['revocation_endpoint']),
|
43
|
+
well_known_token_url: make_url_absolute(base_url, config['token_endpoint'])
|
38
44
|
|
39
45
|
content_type = request.response_header('Content-Type')&.value
|
40
46
|
|
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.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen MacVicar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- lib/smart_app_launch/token_refresh_test.rb
|
161
161
|
- lib/smart_app_launch/token_response_body_test.rb
|
162
162
|
- lib/smart_app_launch/token_response_headers_test.rb
|
163
|
+
- lib/smart_app_launch/url_helpers.rb
|
163
164
|
- lib/smart_app_launch/version.rb
|
164
165
|
- lib/smart_app_launch/well_known_capabilities_stu1_test.rb
|
165
166
|
- lib/smart_app_launch/well_known_capabilities_stu2_test.rb
|