make some config parts optional

This commit is contained in:
Jörn-Michael Miehe 2022-03-30 11:24:47 +00:00
parent 24721dd342
commit d9552cbf42

View file

@ -227,8 +227,8 @@ class CryptoConfig(BaseModel):
schemes: list[str] = ["bcrypt"]
# pki settings
cert_algo: CertificateAlgo
expiry_days: int
cert_algo: CertificateAlgo | None
expiry_days: int | None
@property
def context(self) -> CryptContext:
@ -246,7 +246,7 @@ class Config(BaseModel):
# common name for the server
server_name: str
# may include client-to-client, cipher etc.
openvpn_extra_options: dict[str, Any]
openvpn_extra_options: dict[str, Any] | None
db: DBConfig
jwt: JWTConfig