-
Notifications
You must be signed in to change notification settings - Fork 1
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
Follow the specs more closely, switch to JWTs.jl, and fix the tests #9
Conversation
5df875a
to
d4b5e30
Compare
d4b5e30
to
2cd8e7b
Compare
2cd8e7b
to
63bed64
Compare
So, if I recall correctly, not all servers support |
I could not find the |
For the
For the
For the specific use of the
The reality is that there are still R4 systems out there in the wild that only support |
Even in this document the
I'm sure you have better experience with these systems, so maybe that's what we have to do regardless of the specifications. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #9 +/- ##
===========================================
- Coverage 100.00% 94.20% -5.80%
===========================================
Files 5 4 -1
Lines 38 69 +31
===========================================
+ Hits 38 65 +27
- Misses 0 4 +4 ☔ View full report in Codecov by Sentry. |
@DilumAluthge the PR is ready for a re-review, I added a fallback with the metadata endpoint and a test for it. |
# Extract the token endpoint from the JSON response | ||
# Ref: https://hl7.org/fhir/smart-app-launch/1.0.0/conformance/index.html#declaring-support-for-oauth2-endpoints | ||
# Ref: https://hl7.org/fhir/R4/capabilitystatement.html | ||
compat_statement = JSON3.read(_metadata_response.body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use struct-mapping instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial implementation used struct mapping but it felt a bit too verbose since it requires a struct for every level of this nested structure.
@devmotion Looks like you need some tests to increase code coverage, and then we're good to go here? |
I've removed Codecov from the list of required checks. |
This is a larger PR that extends #8:
.well-known/smart-configuration
(instead users have to specify the arguably more intuitive base URL of the server),iss
andsub
are enforced to be the sameclient_id
, and it is mandatory to specify thescope
Tests fail currently due to tanmaykm/JWTs.jl#25: https://github.com/JuliaHealth/SMARTBackendServices.jl/actions/runs/7563819763/job/20596913050?pr=9#step:6:128
With the fix in tanmaykm/JWTs.jl#25, tests pass locally.