smart_udap_harmonization_test_kit 0.10.2 → 0.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28ae0f42ead60c2deb2a37e2dbced0a3b95879b50a7ea4ed917985f917b869eb
4
- data.tar.gz: 589da64f493da9f7d79053af96391cb79705cc69eb5ccf5d6ba818e81b23edc3
3
+ metadata.gz: 8bd4f97d7e5e81426e84e355e865547fd5bafc08c05961f1fe997dbda4d02c17
4
+ data.tar.gz: 92be2b2e28fa35bac309359094dfb51e61c5a4cc4d129d490e3cba9389e18fac
5
5
  SHA512:
6
- metadata.gz: b40671103543ec1ef346cc39769cf670a45c12740a23cfe03323a7962084d0cf9676e676d5f41f864322e1acfc380059e230dcd18fa0e715d78a62b4e1ea64e8
7
- data.tar.gz: 2c028d7525b8dfb24182963bb39fc51f169b6436c061d423cb0ee1df9cdb2b22290de1c73c2cac21bab3c03bf75eeb5e9f0c8442dfdc06f6b8beeefd29297e22
6
+ metadata.gz: 5f7f29041c3cb2beb8f7ceb02940c9ea34106baee86e52bd4df3c1174693feba6205d5bf1a277dcd31288fb1672a7a3a6e3d67d63fa73c3919b9beda7e4c1ce3
7
+ data.tar.gz: 6b7bdd9a74d9743a4c064980ffe5a3ea76c1e5f1fb9a725c1cf6b8d9c490882b39c962cf446b907706be6f9b4be5faabcb6f6df0ea14572c866c74a162a11c69
@@ -12,58 +12,20 @@ module SMART_UDAP_HarmonizationTestKit
12
12
 
13
13
  config(
14
14
  inputs: {
15
- client_id: {
16
- name: :udap_client_id,
17
- title: 'UDAP Client ID'
15
+ smart_auth_info: {
16
+ title: 'UDAP Auth Info',
17
+ options: {
18
+ mode: 'access'
19
+ }
18
20
  },
19
21
  token_response_body: {
20
22
  name: :udap_auth_code_flow_token_exchange_response_body
21
23
  },
22
- token_retrieval_time: {
23
- name: :udap_auth_code_flow_token_retrieval_time
24
- },
25
- requested_scopes: {
26
- name: :udap_auth_code_flow_registration_scope,
27
- title: 'Requested Scopes',
28
- description: 'Scopes client requested from the authorization server during the authorization step.'
29
- },
30
24
  url: {
31
25
  name: :udap_fhir_base_url,
32
26
  title: 'FHIR Server URL'
33
27
  }
34
28
  }
35
29
  )
36
-
37
- test do
38
- id :smart_udap_openid_connect_setup
39
- title 'OpenID Connect Test Setup'
40
-
41
- input :token_response_body,
42
- title: 'Token Exchange Response Body',
43
- description: 'JSON response body returned by the authorization server during the token exchange step'
44
-
45
- input :token_retrieval_time,
46
- title: 'Token Retrieval Time'
47
-
48
- output :id_token,
49
- :access_token,
50
- :smart_credentials
51
-
52
- run do
53
- assert_valid_json(token_response_body)
54
-
55
- token_response = JSON.parse(token_response_body)
56
-
57
- output id_token: token_response['id_token'],
58
- access_token: token_response['access_token'],
59
- smart_credentials: {
60
- access_token: token_response_body['access_token'],
61
- expires_in: token_response_body['expires_in'],
62
- token_retrieval_time:
63
- }.to_json
64
- end
65
- end
66
-
67
- children.unshift children.pop
68
30
  end
69
31
  end
@@ -17,28 +17,39 @@ module SMART_UDAP_HarmonizationTestKit
17
17
  :udap_token_endpoint,
18
18
  :udap_client_id
19
19
 
20
- output :smart_credentials,
21
- :id_token,
20
+ input :udap_auth_code_flow_registration_scope,
21
+ title: 'Authorization Code Registration Requested Scope(s)',
22
+ description: %(
23
+ String containing a space delimited list of scopes requested by the client application for use in
24
+ subsequent requests. The Authorization Server MAY consider this list when deciding the scopes that it
25
+ will allow the application to subsequently request. Apps requesting the "authorization_code" grant
26
+ type SHOULD request user or patient scopes.
27
+ )
28
+
29
+ output :id_token,
22
30
  :refresh_token,
23
31
  :access_token,
24
32
  :expires_in,
25
33
  :patient_id,
26
34
  :encounter_id,
27
- :received_scopes
35
+ :received_scopes,
36
+ :smart_auth_info
28
37
 
29
38
  run do
30
39
  assert_valid_json(udap_auth_code_flow_token_exchange_response_body)
31
40
  token_response_body_parsed = JSON.parse(udap_auth_code_flow_token_exchange_response_body)
32
41
 
33
- output smart_credentials: {
34
- refresh_token: token_response_body_parsed['refresh_token'],
35
- access_token: token_response_body_parsed['access_token'],
36
- expires_in: token_response_body_parsed['expires_in'],
37
- client_id: udap_client_id,
38
- client_secret: '',
39
- udap_auth_code_flow_token_retrieval_time:,
40
- token_url: udap_token_endpoint
41
- }.to_json
42
+ smart_auth_info = Inferno::DSL::AuthInfo.new(
43
+ {
44
+ refresh_token: token_response_body_parsed['refresh_token'],
45
+ access_token: token_response_body_parsed['access_token'],
46
+ expires_in: token_response_body_parsed['expires_in'],
47
+ client_id: udap_client_id,
48
+ issue_time: udap_auth_code_flow_token_retrieval_time,
49
+ requested_scopes: udap_auth_code_flow_registration_scope,
50
+ token_url: udap_token_endpoint
51
+ }
52
+ )
42
53
 
43
54
  output id_token: token_response_body_parsed['id_token'],
44
55
  refresh_token: token_response_body_parsed['refresh_token'],
@@ -46,7 +57,8 @@ module SMART_UDAP_HarmonizationTestKit
46
57
  expires_in: token_response_body_parsed['expires_in'],
47
58
  patient_id: token_response_body_parsed['patient'],
48
59
  encounter_id: token_response_body_parsed['encounter'],
49
- received_scopes: token_response_body_parsed['scope']
60
+ received_scopes: token_response_body_parsed['scope'],
61
+ smart_auth_info: smart_auth_info
50
62
 
51
63
  assert received_scopes.present?, 'Token exchange response does not include the `scope` parameter'
52
64
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SMART_UDAP_HarmonizationTestKit
4
- VERSION = '0.10.2'
5
- LAST_UPDATED = '2025-03-06'
4
+ VERSION = '0.11.0'
5
+ LAST_UPDATED = '2025-03-28'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_udap_harmonization_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alisa Wallace
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-03-06 00:00:00.000000000 Z
12
+ date: 2025-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: inferno_core
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 0.6.2
20
+ version: 0.6.7
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 0.6.2
27
+ version: 0.6.7
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: smart_app_launch_test_kit
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.5.0
34
+ version: 0.6.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.5.0
41
+ version: 0.6.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: udap_security_test_kit
44
44
  requirement: !ruby/object:Gem::Requirement