Replace jwt decorators with flask-login
Using flask-login request_loader, we can validate jwt tokens. This allows to use the same decorators for the web UI (using cookies) and the API (using JWT) as well as the current_user local proxy.
Showing
- app/api/inventory.py 17 additions, 24 deletionsapp/api/inventory.py
- app/api/network.py 18 additions, 26 deletionsapp/api/network.py
- app/api/user.py 6 additions, 8 deletionsapp/api/user.py
- app/decorators.py 11 additions, 41 deletionsapp/decorators.py
- app/models.py 9 additions, 5 deletionsapp/models.py
- app/tasks.py 4 additions, 5 deletionsapp/tasks.py
- app/tokens.py 86 additions, 2 deletionsapp/tokens.py
- app/utils.py 5 additions, 17 deletionsapp/utils.py
Loading
Please register or sign in to comment