Add Splitwise clone backend
This commit is contained in:
18
app/config.py
Normal file
18
app/config.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
|
|
||||||
|
|
||||||
|
class Settings(BaseSettings):
|
||||||
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||||||
|
|
||||||
|
database_url: str = "postgres://spliteasy:spliteasy@localhost:5432/spliteasy"
|
||||||
|
oidc_issuer: str = "https://keycloak.example.com/realms/myrealm"
|
||||||
|
oidc_client_id: str = "spliteasy"
|
||||||
|
oidc_client_secret: str = ""
|
||||||
|
allowed_audiences: str = "account,spliteasy"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def audiences(self) -> list[str]:
|
||||||
|
return [a.strip() for a in self.allowed_audiences.split(",") if a.strip()]
|
||||||
|
|
||||||
|
|
||||||
|
settings = Settings()
|
||||||
Reference in New Issue
Block a user