flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

Implements Swagger apiKey Preauthorization

Open yweber opened this issue 5 years ago • 1 comments

Solution proposal for #196

The flask_restx.Api class provides an apikey_preauthorization decorator allowing to register a function returning wether or not preauthorization is wanted.

In the case where preauthorization is wanted, the registered function should returns a tuple with Authorization_name and the APIKey.

yweber avatar Aug 13 '20 13:08 yweber

Codecov Report

Merging #198 into master will decrease coverage by 0.06%. The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #198      +/-   ##
==========================================
- Coverage   96.92%   96.85%   -0.07%     
==========================================
  Files          19       19              
  Lines        2697     2701       +4     
==========================================
+ Hits         2614     2616       +2     
- Misses         83       85       +2     
Impacted Files Coverage Δ
flask_restx/api.py 96.69% <50.00%> (-0.45%) :arrow_down:
flask_restx/apidoc.py 100.00% <100.00%> (ø)

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 66d884f...85310b3. Read the comment docs.

codecov[bot] avatar Aug 13 '20 13:08 codecov[bot]