Skip to main content

casbin-fastapi-decorator

Authorization decorator factory for FastAPI based on Casbin

🎯

Decorator-based

Apply authorization directly to routes with a decorator. No middleware, no extra parameters in your function signatures.

🔒

Casbin-powered

Built on Apache Casbin — supports RBAC, ABAC, and any access control model you define in your policy files.

🧩

Three optional extras

Extend with JWT authentication, SQLAlchemy database-backed policies, or Casdoor OAuth2 — install only what you need.