Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-2863: Added support for auth_info to fhir_client #512

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

vanessuniq
Copy link
Contributor

Summary

This branch updates the fhir client to support auth info.

  • it adds the auth_info attribute to a fhir client
  • it uses credentials from auth info when making requests

Testing Guidance

Updated tests in the access mode group of the auth info suite to verify that auth_info is properly declare when defining fhir_client. The tests will verify that the fhir_client.auth_info attributes are what is expected.

Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
@vanessuniq vanessuniq self-assigned this Jul 2, 2024
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 46.87500% with 17 lines in your changes missing coverage. Please review.

Project coverage is 79.51%. Comparing base (ca84840) to head (bd0c7c0).

Files Patch % Lines
dev_suites/dev_auth_info/auth_info_suite.rb 23.80% 16 Missing ⚠️
lib/inferno/dsl/fhir_client_builder.rb 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #512      +/-   ##
==========================================
+ Coverage   79.46%   79.51%   +0.04%     
==========================================
  Files         242      242              
  Lines       12078    12105      +27     
  Branches     1185     1189       +4     
==========================================
+ Hits         9598     9625      +27     
  Misses       1815     1815              
  Partials      665      665              
Flag Coverage Δ
backend 91.32% <46.87%> (+0.06%) ⬆️
frontend 73.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
# self.client = client
client.auth_info = self
self.client = client
# TODO: do we want to perform authorization if no access_token or rely on SMART/ other auth tests?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have to wait. Performing auth (other than backend services) will require setting up redirect endpoints in core and will be a larger undertaking.

@vanessuniq vanessuniq merged commit 6eef3b3 into main Jul 3, 2024
9 of 10 checks passed
@rpassas rpassas mentioned this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants