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

Replace JSONWebTokens.jl with JWTs.jl #8

Closed
wants to merge 2 commits into from
Closed

Conversation

devmotion
Copy link
Member

@devmotion devmotion commented Sep 8, 2023

I played around a bit with JWTs.jl (and contacted Tanmay regarding the maintenance status of the package). My impression is that it should be possible to use it instead of JSONWebTokens.jl, and AFAICT it already includes the key id in the header (https://github.com/tanmaykm/JWTs.jl/blob/dece86f6a9f74258c7c5b463e8f71992cefa6ebc/src/JWTs.jl#L94 and https://github.com/tanmaykm/JWTs.jl/blob/dece86f6a9f74258c7c5b463e8f71992cefa6ebc/src/JWTs.jl#L153) which would require felipenoris/JSONWebTokens.jl#21 for JSONWebTokens.jl.

The PR is breaking due to changes in the configuration struct but the design is only very preliminary - I wonder e.g. if some of the setup in the test should be performed automatically (possibly as an alternative).

I tried to follow the specifications of the test server (also based the type and id of the signing key on https://launchsmarthealthit.org/v/r4/fhir/.well-known/openid-configuration or rather the jwks_uri specified therein) but unfortunately tests still fail. I wonder if some additional checks in https://github.com/smart-on-fhir/smart-launcher-v2/blob/3c79b5032adc576fba2e5d4258d61d4e0f189778/backend/routes/auth/token.ts#L252 are still violated but I tried to e.g. specify the same iss and sub (due to the check in https://github.com/smart-on-fhir/smart-launcher-v2/blob/3c79b5032adc576fba2e5d4258d61d4e0f189778/backend/routes/auth/token.ts#L309-L312) without success.

Never mind, I misunderstood the JWT/JWK design initially.

Any ideas @DilumAluthge?

@devmotion
Copy link
Member Author

Closed in favour of #9.

@devmotion devmotion closed this Jan 25, 2024
@devmotion devmotion deleted the dw/jwts_jl branch January 25, 2024 00:09
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.

1 participant