APIRouter factories with auth dependencies pre-bound.
Use these INSTEAD of bare APIRouter() when mounting routes. Each factory
is the single public way to get a router of its auth class, which makes
"deny by default" structurally enforced.
CurrentUser
module-attribute
CurrentUser = Annotated[str, Depends(_user_dep)]
CurrentAdmin
module-attribute
CurrentAdmin = Annotated[str, Depends(_admin_dep)]
CurrentServiceCaller
module-attribute
CurrentServiceCaller = Annotated[dict[str, Any], Depends(_service_dep)]
public_liveness_router
public_liveness_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def public_liveness_router() -> APIRouter:
return APIRouter()
|
public_auth_router
public_auth_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def public_auth_router() -> APIRouter:
return APIRouter()
|
public_webhook_twilio_router
public_webhook_twilio_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def public_webhook_twilio_router() -> APIRouter:
return APIRouter()
|
user_router
user_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def user_router() -> APIRouter:
return APIRouter(dependencies=[Depends(_user_dep)])
|
admin_router
admin_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def admin_router() -> APIRouter:
return APIRouter(dependencies=[Depends(_admin_dep)])
|
service_router
service_router() -> APIRouter
Source code in src/donna/api/auth/router_factory.py
| def service_router() -> APIRouter:
return APIRouter(dependencies=[Depends(_service_dep)])
|