feat: integrate idpyoidc server into app lifespan

This commit is contained in:
Johan Lundberg 2026-02-16 13:29:39 +01:00
parent 2426e0675c
commit 95d184ce0f
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,14 @@
from httpx import AsyncClient
async def test_oidc_server_on_app_state(client: AsyncClient) -> None:
app = client._transport.app # type: ignore[union-attr]
assert hasattr(app.state, "oidc_server")
assert app.state.oidc_server is not None
async def test_manage_client_registered(client: AsyncClient) -> None:
app = client._transport.app # type: ignore[union-attr]
oidc_server = app.state.oidc_server
settings = app.state.settings
assert settings.manage_client_id in oidc_server.context.cdb