from typing import Literal

DEBUG = True

# Config for tAuth
ALLOW_NEW_USERS = True

# The following timestamps are in hours:
# How long to keep a session logged in without any activity
MAX_SESSION_TIMEOUT = 24 * 7 if DEBUG else 24 * 60
# How long to keep a session valid since it was initially logged in (-1 to disable)
MAX_SESSION_LENGTH = -1

# DON'T PUT A TRAILING SLASH ON URLS!
# Use a local url for faster communication for INTERNAL urls.
# ---------------------------------------
tCOMMON_URL_PUBLIC = "http://localhost:8888"
tCOMMON_URL_INTERNAL = "http://localhost:8888"

# This token should match the tokens set in the config.py files for other services
tCOMMON_TOKEN = "Secret tCommon-specific token"

ENABLED_APPLICATIONS: dict[str, Literal[False] | None | tuple[str, str, str]] = {
#   The tokens set here should match the tokens in other services. If they don't, the service will refuse to start.
#   "service": ("token", "internal_url", "public_url")
    "auth":    ("Secret tAuth-specific token",    "http://localhost:8000", "http://localhost:8000"),
    "message": ("Secret tMessage-specific token", "http://localhost:8001", "http://localhost:8001")
}
