oleg-agapov / flask-jwt-auth Goto Github PK
View Code? Open in Web Editor NEWJWT Authorization in Flask
License: MIT License
JWT Authorization in Flask
License: MIT License
Hi,
Thanks for the great input. I think your requirements file is containing a little to much. Do you have the correct dependancy list?
Kr
Mads
hello sir, im much thankful with your application that really helps me. there was no error after i used your configuration in my virtual environment which mean in localhost. But when I configured it through uwgi using the AWS server (amazon), there was an error says No module named 'flask_jwt_extended'. Could you help me sir regarding with this issue? :) I already asked it in stackoverflow and it seems they're dont have an idea how to solve it thanks. the logs are here in this link https://stackoverflow.com/questions/50786201/importerror-no-module-named-flask-jwt-extended-in-python-flask
more powers to you :)
Hi Oleg.
I cloned the repository and found that some methods are deprecated and if I try to change their names to what's suggested by "flask_jwt_extended", it would break more things.. I think the code needs a test and update since it was based on older Python modules. Here's an example of errors I'm getting right now:
(venv) d806848@nebula-03:~/flask-jwt-auth$ FLASK_APP=run.py FLASK_DEBUG=1 flask run --host=0.0.0.0
Iv'e tired to run this example but without success.
[2020-01-08 08:28:14,067] ERROR in app: Exception on /secret [GET]
Traceback (most recent call last):
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_restful/__init__.py", line 458, in wrapper
resp = resource(*args, **kwargs)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask/views.py", line 89, in view
return self.dispatch_request(*args, **kwargs)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_restful/__init__.py", line 573, in dispatch_request
resp = meth(*args, **kwargs)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 107, in wrapper
verify_jwt_in_request()
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 32, in verify_jwt_in_request
jwt_data, jwt_header = _decode_jwt_from_request(request_type='access')
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/view_decorators.py", line 294, in _decode_jwt_from_request
decoded_token = decode_token(encoded_token, csrf_token)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/utils.py", line 118, in decode_token
allow_expired=allow_expired
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/flask_jwt_extended/tokens.py", line 140, in decode_jwt
leeway=leeway, options=options, issuer=issuer)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jwt.py", line 92, in decode
jwt, key=key, algorithms=algorithms, options=options, **kwargs
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jws.py", line 156, in decode
key, algorithms)
File "/home/devuser/private/projects/venv/lib/python3.6/site-packages/jwt/api_jws.py", line 216, in _verify_signature
raise InvalidAlgorithmError('The specified alg value is not allowed')
jwt.exceptions.InvalidAlgorithmError: The specified alg value is not allowed
127.0.0.1 - - [08/Jan/2020 08:28:14] "GET /secret HTTP/1.1" 500 -
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.