diff --git a/flask_jwt_oidc/jwt_manager.py b/flask_jwt_oidc/jwt_manager.py index 94e10cf..cece9e2 100644 --- a/flask_jwt_oidc/jwt_manager.py +++ b/flask_jwt_oidc/jwt_manager.py @@ -22,7 +22,8 @@ from functools import wraps from cachelib import SimpleCache -from flask import _request_ctx_stack, current_app, g, jsonify, request +from flask import current_app, g, jsonify, request +from flask.globals import request_ctx from jose import jwt from six.moves.urllib.request import urlopen @@ -331,7 +332,7 @@ def _validate_token(self, token): audience=self.audience, issuer=self.issuer ) - _request_ctx_stack.top.current_user = g.jwt_oidc_token_info = payload + request_ctx.current_user = g.jwt_oidc_token_info = payload except jwt.ExpiredSignatureError as sig: raise AuthError({'code': 'token_expired', 'description': 'token has expired'}, 401) from sig diff --git a/setup.py b/setup.py index 83e6451..ba45315 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def read(filepath): setup(name='flask_jwt_oidc', - version='0.2.0', + version='0.3.0', description='Flask JWT OIDC', author='thor wolpert, with help from others', author_email='thor@wolpert.ca',