Open utterances-bot opened 2 years ago
In an update to werkzeug.exceptions, get_headers now takes 3 params instead of two. In src/package/api/exceptions you need to fix the following:
Roughly line 26: def get_headers(self, environ, scope=None):
Roughly line 44: def get_headers(self, environ, scope=None):
Note the inclusion of the third param, scope, with a default setting of None. These two functions extend the core get_headers function from the main package. The main package was upgraded to include the their param, but this post was not updated to reflect that need.
yup, but how do you fix that issues @risteelman
How To: Create a Flask API with JWT-Based Authentication (Part 4) - aaronluna.dev
Part 4 completes the user authorization API by implementing login, logout and user verification API endpoints. The process to create a custom decorator that only allows access to users with a valid JWT is covered in-depth. How to send an HTTP request for a protected resource that includes a JWT is demonstrated with both Swagger UI and command-line tools. A new class/database model is introduced to create a token blacklist, to ensure that JWTs cannot be used after the user has logged out. Test cases are created and executed for all API endpoints covering successful and failed attempts to login/logout/retrieve user info.
https://aaronluna.dev/series/flask-api-tutorial/part-4/