# Database
ENV_ENABLE_SQL_LOG = "ENABLE_SQL_LOG"
ENV_SQL_ASYNC_CONNECTION_STRING = "SQL_ASYNC_CONNECTION_STRING"
ENV_SQL_CONNECTION_STRING = "SQL_CONNECTION_STRING"

# Cache
DEFAULT_CACHE_REDIS_URL = "redis://localhost:6379"
ENV_CACHE_REDIS_MASTER_PASSWORD = "CACHE_REDIS_MASTER_PASSWORD"
ENV_CACHE_REDIS_MASTER_SERVICE = "CACHE_REDIS_MASTER_SERVICE"
ENV_CACHE_REDIS_MASTER_USERNAME = "CACHE_REDIS_MASTER_USERNAME"
ENV_CACHE_REDIS_SENTINEL_PASSWORD = "CACHE_REDIS_SENTINEL_PASSWORD"
ENV_CACHE_REDIS_SENTINEL_USERNAME = "CACHE_REDIS_SENTINEL_USERNAME"
ENV_CACHE_REDIS_SENTINELS = "CACHE_REDIS_SENTINELS"
ENV_CACHE_REDIS_URL = "CACHE_REDIS_URL"
ENV_ENABLE_CACHE_REDIS_CLUSTER = "ENABLE_CACHE_REDIS_CLUSTER"

# OAuth2 / OIDC
DEFAULT_AUTHENTICATION_REQUEST_VERIFY_SSL = "true"
DEFAULT_AUTH_JWKS_TTL_SEC = "10800"  # 3 hours
DEFAULT_AUTH_TOKEN_TTL_SEC = "3600"  # 1 hour
DEFAULT_INTROSPECT_TOKEN_KEY = "token"
ENV_ALLOWED_AUD = "ALLOWED_AUD"
ENV_AUTHENTICATION_REQUEST_VERIFY_SSL = "AUTHENTICATION_REQUEST_VERIFY_SSL"
ENV_CLIENT_ID = "CLIENT_ID"
ENV_CLIENT_SECRET = "CLIENT_SECRET"
ENV_ENABLE_BACKCHANNEL_LOGOUT = "ENABLE_BACKCHANNEL_LOGOUT"
ENV_ENABLE_FETCH_USERINFO = "ENABLE_FETCH_USERINFO"
ENV_ENABLE_INTROSPECT_TOKEN = "ENABLE_INTROSPECT_TOKEN"
ENV_ENABLE_LOGOUT_BY_SUB = "ENABLE_LOGOUT_BY_SUB"
ENV_ENABLE_VERIFY_ID_TOKEN = "ENABLE_VERIFY_ID_TOKEN"
ENV_BACKCHANNEL_LOGOUT_TOKEN_ISS = "BACKCHANNEL_LOGOUT_TOKEN_ISS"
ENV_BACKCHANNEL_SID_MAP_TTL_SEC = "BACKCHANNEL_SID_MAP_TTL_SEC"
ENV_INTROSPECT_REQUIRES_AUTH = "INTROSPECT_REQUIRES_AUTH"
ENV_INTROSPECT_TOKEN_KEY = "INTROSPECT_TOKEN_KEY"
ENV_INTROSPECT_URL = "INTROSPECT_URL"
ENV_AUTH_JWKS_TTL_SEC = "AUTH_JWKS_TTL_SEC"
ENV_AUTH_TOKEN_TTL_SEC = "AUTH_TOKEN_TTL_SEC"
ENV_BACKCHANNEL_SUB_MAP_TTL_SEC = "BACKCHANNEL_SUB_MAP_TTL_SEC"
ENV_JWKS_URL = "JWKS_URL"
ENV_USERINFO_URL = "USERINFO_URL"

# Secrets Encryption Key
ENV_SECRETS_ENCRYPTION_KEY = "SECRETS_ENCRYPTION_KEY"

# Authorization
AUTH_ENGINE_ALLOW = "allow_all"
AUTH_ENGINE_DENY = "deny_all"
ENV_AUTHORIZATION_ENGINE = "AUTHORIZATION_ENGINE"

__all__ = [
    # Database
    "ENV_ENABLE_SQL_LOG",
    "ENV_SQL_ASYNC_CONNECTION_STRING",
    "ENV_SQL_CONNECTION_STRING",
    # Cache
    "DEFAULT_CACHE_REDIS_URL",
    "ENV_CACHE_REDIS_MASTER_PASSWORD",
    "ENV_CACHE_REDIS_MASTER_SERVICE",
    "ENV_CACHE_REDIS_MASTER_USERNAME",
    "ENV_CACHE_REDIS_SENTINEL_PASSWORD",
    "ENV_CACHE_REDIS_SENTINEL_USERNAME",
    "ENV_CACHE_REDIS_SENTINELS",
    "ENV_CACHE_REDIS_URL",
    "ENV_ENABLE_CACHE_REDIS_CLUSTER",
    # OAuth2 / OIDC
    "DEFAULT_INTROSPECT_TOKEN_KEY",
    "DEFAULT_AUTH_JWKS_TTL_SEC",
    "DEFAULT_AUTH_TOKEN_TTL_SEC",
    "ENV_ALLOWED_AUD",
    "ENV_AUTHENTICATION_REQUEST_VERIFY_SSL",
    "ENV_CLIENT_ID",
    "ENV_ENABLE_BACKCHANNEL_LOGOUT",
    "ENV_CLIENT_SECRET",
    "ENV_ENABLE_FETCH_USERINFO",
    "ENV_ENABLE_INTROSPECT_TOKEN",
    "ENV_ENABLE_VERIFY_ID_TOKEN",
    "ENV_BACKCHANNEL_LOGOUT_TOKEN_ISS",
    "ENV_BACKCHANNEL_SID_MAP_TTL_SEC",
    "ENV_ENABLE_LOGOUT_BY_SUB",  # Added here for consistency
    "ENV_INTROSPECT_REQUIRES_AUTH",
    "ENV_INTROSPECT_TOKEN_KEY",
    "ENV_INTROSPECT_URL",
    "ENV_AUTH_JWKS_TTL_SEC",
    "ENV_AUTH_TOKEN_TTL_SEC",
    "ENV_JWKS_URL",
    "ENV_USERINFO_URL",
    "ENV_BACKCHANNEL_SUB_MAP_TTL_SEC",  # Added here for consistency
    # Secrets Encryption Key
    "ENV_SECRETS_ENCRYPTION_KEY",
    # Authorization
    "AUTH_ENGINE_ALLOW",
    "AUTH_ENGINE_DENY",
    "ENV_AUTHORIZATION_ENGINE",
]
