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

Add request lifecycle hooks aka middleware #137

Open
TheCaffinatedDeveloper opened this issue Jan 7, 2025 · 0 comments
Open

Add request lifecycle hooks aka middleware #137

TheCaffinatedDeveloper opened this issue Jan 7, 2025 · 0 comments

Comments

@TheCaffinatedDeveloper
Copy link

I saw from an earlier issue that it was deemed token refresh is out of scope for this library.

While disappointing, I can get behind the logic but request that the framework then expose hooks so that we can provide token management ourselves.

For example, right now I am subclassing AsyncFHIRClient and overriding _do_request so that I can catch expired tokens and handle refreshing. This isn't ideal since I am dependent on this library's implementation which is subject to change. It would be nice if instead, there were a before_request hook that allows us to mutate request headers and the like accordingly.

BTW, this is by FAR the best implementation of a FHIR client I have come across. While aimed mostly towards Aidbox, it has been working fine with HAPI and is leaps and bounds above the SMART on FHIR client that is somehow advertised excessively.

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

No branches or pull requests

1 participant