Skip to content

Commit

Permalink
update jwt salt variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Mubangizi committed May 20, 2024
1 parent 6482a8c commit 6a908bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions app/helpers/authenticate.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# from flask_jwt_extended import (
# jwt_required as jwt,
# verify_jwt_in_request
# )
from functools import wraps
from jose import jwt
from flask import request, jsonify
from flask import request
import os


Expand All @@ -24,7 +20,7 @@ def wrapper(*args, **kwargs):
return dict(message="Bad Authorization header. Expected value 'Bearer <JWT>'"), 422

payload = jwt.decode(token, os.getenv(
'JWT_SALT'), algorithms=['HS256'])
'FLASK_APP_SALT'), algorithms=['HS256'])

except Exception as e:
print(e)
Expand Down
2 changes: 1 addition & 1 deletion config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Base:

# main
SECRET_KEY = os.getenv("FLASK_APP_SECRET")
JWT_SALT = os.getenv("JWT_SALT")
FLASK_APP_SALT = os.getenv("FLASK_APP_SALT")
PRODUCT_BASE_URL = os.getenv('PRODUCT_BASE_URL')


Expand Down
4 changes: 2 additions & 2 deletions helm/values.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ environment:
DATABASE_USER: ${{ DATABASE_USER }}
TEST_DATABASE_URI: ${{ TEST_DATABASE_URL }}
FLASK_APP: server.py
FLASK_APP_SALT: ${{ APP_SALT }}
FLASK_APP_SECRET: ${{ APP_SECRET }}
FLASK_APP_SALT: ${{ FLASK_APP_SALT }}
FLASK_APP_SECRET: ${{ FLASK_APP_SECRET }}
FLASK_ENV: production
LOGGER_APP_URL: ${{ LOGGER_APP_URL }}
PRODUCT_BASE_URL: ${{PRODUCT_BASE_URL}}

0 comments on commit 6a908bc

Please sign in to comment.