Skip to content

Commit 647b744

Browse files
committed
Adding requirements
1 parent 5a8df54 commit 647b744

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/helpers/authenticate.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ blinker==1.7.0
44
certifi==2024.2.2
55
charset-normalizer==3.3.2
66
click==8.1.7
7+
colorama==0.4.6
78
flasgger==0.9.7.1
89
Flask==3.0.3
910
Flask-Cors==4.0.0
11+
Flask-JWT-Extended==4.6.0
1012
Flask-RESTful==0.3.10
1113
idna==3.6
1214
itsdangerous==2.1.2
@@ -17,6 +19,7 @@ MarkupSafe==2.1.5
1719
mistune==3.0.2
1820
packaging==24.0
1921
prometheus-http-client==1.0.0
22+
PyJWT==2.8.0
2023
python-dotenv==1.0.1
2124
pytz==2024.1
2225
PyYAML==6.0.1

0 commit comments

Comments
 (0)