disable flask-jwt across all routes
See original GitHub issueI have a situation where I am building an API, which allows access to different datasets. One dataset requires authentication and another dataset is public and does not. I need to use the same defined API (and all its routes) for access. Is there a way I can use flask-jwt for API authentication across all of my routes, but then disable it on a config setting or toggle?
I currently apply the jwt_required decorator as a default to all my of routes from a single base class.  This works perfectly for the cases for private data.  I need a way to turn off the authentication system when a certain setting is applied.   Is there a way to disable the jwt_required decorator once applied, or to disable the flask-jwt extension all together?  Or maybe override it?
Issue Analytics
- State:
 - Created 5 years ago
 - Comments:6 (2 by maintainers)
 

Top Related StackOverflow Question
In my flask-restplus app I’m doing this:
This is what I use for debugging (@pgalilea’s method didn’t work for me):