"""PyAuthz FastAPI integration — first-class authorization for FastAPI.

Provides middleware, decorators, and dependency injection for integrating
PyAuthz authorization into FastAPI applications.

Quick Example:
    from fastapi import FastAPI, Depends
    from pyauthz_fastapi import PyAuthzMiddleware, requires, get_subject

    app = FastAPI()
    app.add_middleware(PyAuthzMiddleware, pyauthz=rp, subject_resolver=resolve_user)

    @app.get("/documents/{doc_id}")
    @requires("documents:read")
    async def get_document(doc_id: str, subject: Subject = Depends(get_subject)):
        ...
"""

from pyauthz_fastapi.decorator import requires
from pyauthz_fastapi.dependencies import get_decision, get_pyauthz, get_subject
from pyauthz_fastapi.middleware import (
    PyAuthzMiddleware,
    denied_exception_handler,
    setup_pyauthz,
)

__all__ = [
    "PyAuthzMiddleware",
    "denied_exception_handler",
    "setup_pyauthz",
    "requires",
    "get_subject",
    "get_decision",
    "get_pyauthz",
]
