ramosbugs / openidconnect-rs

OpenID Connect Library for Rust
MIT License
427 stars 103 forks source link

fix: don't enforce jwk signing algorithm if empty #104

Closed ctrlaltf24 closed 1 year ago

ctrlaltf24 commented 1 year ago

Makes the CoreClient::new function usable for claim verification again, as it was in 2.4, while still enforcing IF we have enough context to do so, improving usability of the library.

When attempting to verify a claim using CoreClient::new (as done in 2.4) in version 2.5, the error Signature verification failed\\n\\nCaused by:\\n Disallowed signature algorithm: algorithmRS256is not one of: \" is returned (due to Client::new setting an empty array for supported algorithms).

Context:

OIDC provider: auth0 or google version: 2.5

ramosbugs commented 1 year ago

Thanks for the PR! This bug fix makes sense. I'll backport it to the support/2.x branch and cut a 2.5.1 release since 3.0 isn't ready yet.

codecov[bot] commented 1 year ago

Codecov Report

Merging #104 (edb81f7) into support/2.x (0db8ad1) will decrease coverage by 0.11%. The diff coverage is 0.00%.

@@               Coverage Diff               @@
##           support/2.x     #104      +/-   ##
===============================================
- Coverage        72.68%   72.57%   -0.11%     
===============================================
  Files               16       16              
  Lines             3921     3920       -1     
===============================================
- Hits              2850     2845       -5     
- Misses            1071     1075       +4     
Impacted Files Coverage Δ
src/lib.rs 69.67% <0.00%> (-1.04%) :arrow_down:

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ramosbugs commented 1 year ago

This is now released in 2.5.1