replace all the other config usages with allencompassing config

This commit is contained in:
maxDorninger
2025-07-10 22:25:05 +02:00
parent 1b784c35c1
commit 7ce6de7f85
23 changed files with 76 additions and 80 deletions

View File

@@ -3,21 +3,23 @@ from pydantic import Field
import secrets
class OpenIdConfig(BaseSettings):
client_id: str = ""
client_secret: str = ""
configuration_endpoint: str = ""
name: str = "OpenID"
enabled: bool = False
class AuthConfig(BaseSettings):
# to get a signing key run:
# openssl rand -hex 32
token_secret: str = Field(default_factory=secrets.token_hex)
session_lifetime: int = 60 * 60 * 24
admin_email: list[str] = []
admin_emails: list[str] = []
email_password_resets: bool = False
openid_connect: OpenIdConfig = OpenIdConfig()
@property
def jwt_signing_key(self):
return self._jwt_signing_key
class OpenIdConfig(BaseSettings):
client_id: str
client_secret: str
configuration_endpoint: str
name: str = "OpenID"