Refactor; add services in settings

This commit is contained in:
phil 2025-01-19 01:48:00 +01:00
parent 17fabd21c9
commit f14d8d3114
7 changed files with 272 additions and 224 deletions

View file

@ -13,7 +13,16 @@ from pydantic_settings import (
)
class Resource(BaseModel):
"""A resource with an URL that can be accessed with an OAuth2 access token"""
name: str
url: str
class OIDCProvider(BaseModel):
"""OIDC provider, can also be a resource server"""
id: str
name: str
url: str
@ -22,6 +31,7 @@ class OIDCProvider(BaseModel):
# For PKCE (not implemented yet)
code_challenge_method: str | None = None
hint: str = "No hint"
resources: list[Resource] = []
@computed_field
@property