Co-host the SDK's authorization-server routes and yield a raw httpx client against them.
()
| 30 | |
| 31 | @pytest.fixture |
| 32 | async def as_app() -> AsyncIterator[tuple[httpx.AsyncClient, InMemoryAuthorizationServerProvider]]: |
| 33 | """Co-host the SDK's authorization-server routes and yield a raw httpx client against them.""" |
| 34 | provider = InMemoryAuthorizationServerProvider() |
| 35 | settings = auth_settings() |
| 36 | async with mounted_app( |
| 37 | Server("guarded"), |
| 38 | auth=settings, |
| 39 | token_verifier=ProviderTokenVerifier(provider), |
| 40 | auth_server_provider=provider, |
| 41 | ) as (http, _): |
| 42 | yield http, provider |
| 43 | |
| 44 | |
| 45 | def _pkce_pair() -> tuple[str, str]: |
nothing calls this directly
no test coverage detected