Add resource provider settings
Some checks failed
/ build (push) Failing after 14s
/ test (push) Successful in 5s

This commit is contained in:
phil 2025-01-20 04:35:33 +01:00
parent 572d2a7b0d
commit 7ab715da5a

View file

@ -4,7 +4,7 @@ import random
from typing import Type, Tuple
from pathlib import Path
from pydantic import BaseModel, computed_field
from pydantic import BaseModel, computed_field, AnyUrl
from pydantic_settings import (
BaseSettings,
SettingsConfigDict,
@ -18,7 +18,6 @@ class Resource(BaseModel):
id: str
name: str
url: str
class OIDCProvider(BaseModel):
@ -48,6 +47,7 @@ class OIDCProvider(BaseModel):
class ResourceProvider(BaseModel):
id: str
name: str
base_url: AnyUrl
resources: list[Resource] = []
@ -61,6 +61,7 @@ class Settings(BaseSettings):
"""Settings wil be read from an .env file"""
oidc: OIDCSettings = OIDCSettings()
resource_providers: list[ResourceProvider] = []
secret_key: str = "".join(random.choice(string.ascii_letters) for _ in range(16))
log: bool = False