Skip to content

Commit

Permalink
Merge pull request #12 from seeker25/flask3_support
Browse files Browse the repository at this point in the history
Upgrade for Flask 2.3 / 3+
  • Loading branch information
thorwolpert authored Mar 4, 2024
2 parents 6688edd + b842ea4 commit 40cc811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions flask_jwt_oidc/jwt_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
Expand Down

0 comments on commit 40cc811

Please sign in to comment.