File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,9 +25,8 @@ def wrapper(*args, **kwargs):
2525 return dict (message = "Bad Authorization header. Expected value 'Bearer <JWT>'" ) , 422
2626
2727 payload = jwt .decode (token , os .getenv ('JWT_Token' ), algorithms = ['HS256' ])
28-
29- # kwargs['current_user'] = payload
30-
28+
29+
3130 except jwt .exceptions .DecodeError :
3231 return dict (message = "Access token is not valid or key" ) , 401
3332
@@ -39,6 +38,5 @@ def admin_required(fn):
3938 @wraps (fn )
4039 @jwt_required
4140 def wrapper (* args , ** kwargs ):
42-
4341 return fn (* args , ** kwargs )
4442 return wrapper
Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ blinker==1.7.0
44certifi == 2024.2.2
55charset-normalizer == 3.3.2
66click == 8.1.7
7+ colorama == 0.4.6
78flasgger == 0.9.7.1
89Flask == 3.0.3
910Flask-Cors == 4.0.0
11+ Flask-JWT-Extended == 4.6.0
1012Flask-RESTful == 0.3.10
1113idna == 3.6
1214itsdangerous == 2.1.2
@@ -17,6 +19,7 @@ MarkupSafe==2.1.5
1719mistune == 3.0.2
1820packaging == 24.0
1921prometheus-http-client == 1.0.0
22+ PyJWT == 2.8.0
2023python-dotenv == 1.0.1
2124pytz == 2024.1
2225PyYAML == 6.0.1
You can’t perform that action at this time.
0 commit comments