-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix ClientRegistrationResponse
failing to deserialize optional fiel…
#66
Conversation
Codecov Report
@@ Coverage Diff @@
## main #66 +/- ##
==========================================
- Coverage 76.93% 76.42% -0.52%
==========================================
Files 16 16
Lines 3482 3482
==========================================
- Hits 2679 2661 -18
- Misses 803 821 +18
Continue to review full report at Codecov.
|
Thanks for the PR! The URL exact string comparison is intended behavior, as documented here: openidconnect-rs/src/macros.rs Lines 258 to 261 in d5cf0ae
From the spec:
I don't see any mention of URL canonicalization in the spec, and various forms of canonicalization have caused security vulnerabilities in other authentication protocols like SAML. Consequently, I think it makes sense to stick to exact URL string comparisons throughout this crate. Client code is free to do a looser comparison if desired by first calling the I'm happy to merge the deserialization fix though. Nice catch 👍 |
Thanks for you quick response! 😁 Using
Need to use |
Ah, I see! I think we can improve the error output here to print the openidconnect-rs/src/discovery.rs Lines 407 to 408 in cfa5af5
(wonder if this issue exists elsewhere in the crate...)
It doesn't involve any extra code, so I don't think it's inconvenient; just how OpenID Connect works. OIDC providers should consider this when picking their issuer URL. |
…ds `client_id_issued_at` and `client_secret_expires_at`.
Thanks a lot, I updated the PR. 😁 |
This PR fixes the following two issues:
Fix
ClientRegistrationResponse
failing to deserialize optional fieldsclient_id_issued_at
andclient_secret_expires_at
.Reference: serde-rs/serde#1951
Made
XXXUrl
's equal behavior consistent withurl::Url
.The following two Urls are now equal.
openidconnect-rs/src/discovery.rs
Line 404 in d5cf0ae