flask-restx
flask-restx copied to clipboard
Implements Swagger apiKey Preauthorization
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.
Codecov Report
Merging #198 into master will decrease coverage by
0.06%. The diff coverage is60.00%.
@@ 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 dataPowered by Codecov. Last update 66d884f...85310b3. Read the comment docs.