Download the PHP package oihana/php-auth without Composer
On this page you can find all versions of the php package oihana/php-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oihana/php-auth
More information about oihana/php-auth
Files in oihana/php-auth
Package php-auth
Short Description Composable PHP authorization toolkit — Casbin RBAC enforcer, JWT/OIDC verification (JWKS), fine-grained capabilities, validation rules and ready-to-use HTTP middlewares for API protection.
License MPL-2.0
Homepage https://github.com/BcommeBois/oihana-php-auth
Informations about the package php-auth
Oihana PHP Auth

Composable PHP authorization toolkit. Part of the Oihana PHP ecosystem, this package combines Casbin RBAC, JWT/OIDC verification, fine-grained capabilities and HTTP middlewares to protect your APIs end‑to‑end.
📚 Documentation
Full API reference (generated with phpDocumentor): https://bcommebois.github.io/oihana-php-auth
User guides (FR + EN) live under wiki/.
📦 Installation
Requires PHP 8.4+. Install via Composer:
✨ What you can do
- Authenticate any request against a Zitadel / Auth0 / Keycloak IdP using a JWKS‑backed JWT validator (cached via Memcached).
- Authorize with Casbin RBAC + domains: route‑level guards, role/permission/policy CRUD, multi‑tenant.
- Restrict sensitive query parameters, filter keys or skin variants with fine‑grained capabilities (subject
PARAM:…). - Validate request bodies via Somnambulist Validation rule catalogues.
- Reuse ready‑made HTTP middlewares (JWT check, authorization, rate‑limit hooks) compatible with any PSR‑15 stack.
Under the hood
- A consistent set of interfaces (
CapabilityEnforcerInterface,PermissionSubjectResolverInterface) you can implement against your own persistence layer. - Pure‑PHP JWT validator built on top of firebase/php-jwt v7.
- Helpers for PSR‑11 Container wiring.
- Strongly‑typed enums and constants — no magic strings.
✅ Running tests
Run all tests:
Run a specific test file:
🛠️ Generate the documentation
We use phpDocumentor to generate documentation into the ./docs folder.
🧾 License
Licensed under the Mozilla Public License 2.0 (MPL‑2.0).
👤 About the author
- Author: Marc ALCARAZ (aka eKameleon)
- Email:
[email protected] - Website:
https://www.ooop.fr
🔗 Related packages
oihana/php-core– core helpers and utilities:https://github.com/BcommeBois/oihana-php-coreoihana/php-enums– typed constants & enums:https://github.com/BcommeBois/oihana-php-enumsoihana/php-exceptions– framework exceptions:https://github.com/BcommeBois/oihana-php-exceptionsoihana/php-reflect– reflection and hydration utilities:https://github.com/BcommeBois/oihana-php-reflectoihana/php-schema– Schema.org constants and vocabulary:https://github.com/BcommeBois/oihana-php-schemaoihana/php-system– framework helpers (controllers, models, request handling):https://github.com/BcommeBois/oihana-php-system
All versions of php-auth with dependencies
ext-memcached Version *
ext-openssl Version *
casbin/casbin Version ^4.0
firebase/php-jwt Version ^7.0
guzzlehttp/guzzle Version ^7.10
php-di/php-di Version ^7.0
psr/container Version ^2.0
psr/http-message Version ^2.0
psr/log Version ^3.0
somnambulist/validation Version ^1.12
oihana/php-controllers Version dev-main
oihana/php-core Version dev-main
oihana/php-enums Version dev-main
oihana/php-exceptions Version dev-main
oihana/php-reflect Version dev-main
oihana/php-schema Version dev-main