ramosbugs / openidconnect-rs

OpenID Connect Library for Rust
MIT License
404 stars 100 forks source link

add AuthorizationRequest::add_scopes #105

Closed ilmari-h closed 1 year ago

ilmari-h commented 1 year ago

Added AuthorizationRequest::add_scopes. This is an equivalent to the underlying oauth2::AuthorizationRequest::add_scopes method, that instead takes an iterator of Scopes as a parameter.

This enables adding a list of scopes in one go, and should solve the use case described in issue https://github.com/ramosbugs/openidconnect-rs/issues/79

ramosbugs commented 1 year ago

Thanks for the PR! Please just fix the cargo fmt issue (pinned to 1.57.0 in case it's version-dependent), and then I'll merge it once CI passes.

codecov[bot] commented 1 year ago

Codecov Report

Merging #105 (4e74da1) into main (8e550ab) will increase coverage by 0.04%. The diff coverage is 88.00%.

@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   73.04%   73.09%   +0.04%     
==========================================
  Files          16       16              
  Lines        3995     4021      +26     
==========================================
+ Hits         2918     2939      +21     
- Misses       1077     1082       +5     
Impacted Files Coverage Δ
src/lib.rs 68.50% <88.00%> (+1.13%) :arrow_up:

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 3.0.0!