miguelgrinberg / Flask-HTTPAuth

Simple extension that provides Basic, Digest and Token HTTP authentication for Flask routes
MIT License
1.27k stars 228 forks source link

Select the closest auth according to auth type #125

Closed lykling closed 3 years ago

lykling commented 3 years ago
codecov-io commented 3 years ago

Codecov Report

Merging #125 (ea562ec) into master (ccf98aa) will decrease coverage by 3.33%. The diff coverage is 70.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #125      +/-   ##
===========================================
- Coverage   100.00%   96.66%   -3.34%     
===========================================
  Files            1        1              
  Lines          254      270      +16     
  Branches        34       40       +6     
===========================================
+ Hits           254      261       +7     
- Misses           0        6       +6     
- Partials         0        3       +3     
Impacted Files Coverage Δ
flask_httpauth.py 96.66% <70.00%> (-3.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ccf98aa...ea562ec. Read the comment docs.

miguelgrinberg commented 3 years ago

While I like that you have made it possible to include auth objects that use custom headers, overall I find that this is a fairly big change and that the same could be achieved by just making a small change while keeping the current logic of the multi auth object. In particular I do not like that you have removed the concept of a main auth object and replaced it with auth[0], which is obscure.

I will take it as a feature request for the custom header support and re-implement this, if you don't mind. If there is any other aspect of this change that you think important to preserve let me know.