Add resource provider settings
This commit is contained in:
parent
572d2a7b0d
commit
7ab715da5a
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue