Closed mr337 closed 9 years ago
You can always install from git - what`s the issue with that?
Yeah I know, but it would be nice to pull from pypi. The fact that the release and HEAD are a little outdated and missing useful things like generate_token
can be frustrating.
+1
+1
Also, for anyone googling, here is whats in my requirements.txt: -e git+https://github.com/mattupstate/flask-jwt.git#egg=flask-jwt
+1
Could you please release the latest stable version on PyPI?
I want to auto-renew and issue new fresh token for client on request. I would use generate_token
function imported from flask_jwt
but it's not on PyPI yet.
So that for now in my Flask-Restful appliction I have to use dirty workaround like listed below:
from flask import current_app
from flask_jwt import current_user
from flask_restful import Resource
def generate_token(user):
""" Currently this is workaround
since the latest version that already has this function
is not published on PyPI yet and we don't want
to install the package directly from GitHub.
See: https://github.com/mattupstate/flask-jwt/blob/9f4f3bc8dce9da5dd8a567dfada0854e0cf656ae/flask_jwt/__init__.py#L145
"""
jwt = current_app.extensions['jwt']
payload = jwt.payload_callback(user)
token = jwt.encode_callback(payload)
return token
class BaseResource(Resource):
def dispatch_request(self, *args, **kwargs):
response = super(BaseResource, self).dispatch_request(*args, **kwargs)
if current_user:
response[2]['Fresh-Token'] = generate_token(current_user)
return response
+1 still :(
I've made a few improvements, but have yet to receive much feedback from users. See pull #51
The #51 seems to be essential with migration to JWT and default handlers. Is it possible to release this ASAP at least as beta or a dev version?
In general it's unclear why such a long non-agile release cycle would be at all desired.
Looks like this could be closed?
But #51 is not live yet. :/
Hi,
Wondering what is the plan on a new release on pypi? There have been some code changes that would be useful to get.
Thx!