Switch to cognito user/password authentication. Major code refactor.
Some checks failed
AWS Deploy on Push / build (push) Failing after 48s
Some checks failed
AWS Deploy on Push / build (push) Failing after 48s
This commit is contained in:
24
app/utils/constants.py
Normal file
24
app/utils/constants.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Utility functions and constants
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from a .env file if it exists
|
||||
load_dotenv()
|
||||
|
||||
# AWS related constants
|
||||
AWS_REGION = os.environ.get("AWS_REGION", "us-east-2")
|
||||
COGNITO_USER_POOL_ID = os.getenv("COGNITO_USER_POOL_ID")
|
||||
COGNITO_CLIENT_ID = os.getenv("COGNITO_CLIENT_ID")
|
||||
COGNITO_CLIENT_SECRET = os.environ.get("COGNITO_CLIENT_SECRET", None)
|
||||
USER_ROLE_ATTRIBUTE = "custom:role"
|
||||
|
||||
IPTV_SERVER_URL = os.getenv("IPTV_SERVER_URL", "https://iptv.fiorinis.com")
|
||||
|
||||
# iptv-server super admin credentials for basic auth
|
||||
# Reads from environment variables IPTV_SERVER_ADMIN_USER and IPTV_SERVER_ADMIN_PASSWORD
|
||||
IPTV_SERVER_ADMIN_USER = os.getenv("IPTV_SERVER_ADMIN_USER", "admin")
|
||||
IPTV_SERVER_ADMIN_PASSWORD = os.getenv("IPTV_SERVER_ADMIN_PASSWORD", "adminpassword")
|
||||
|
||||
# URL for the EPG XML file to place in the playlist's header
|
||||
EPG_URL = os.getenv("EPG_URL", "https://example.com/epg.xml.gz")
|
||||
Reference in New Issue
Block a user