nette/security
Nette Security provides authentication and authorization for PHP apps, with ready-to-use user identity, login/logout handling, roles and permissions, and easy integration with Nette Framework services for secure access control.
UserStorage, and session handling). Laravel’s authentication stack (Fortify, Sanctum, Breeze) relies on middleware, service providers, and Eloquent models, which this package does not natively support.spatie/laravel-permission, entrust) are more mature for Laravel’s ecosystem.SessionStorage and CookieStorage are optimized for Nette’s session system, which may conflict with Laravel’s session drivers (e.g., Redis, database).Authenticator, UserStorage, and Authorizator with Laravel’s AuthManager, Guard, and User model.Authenticate, VerifyCsrfToken) would need rewriting to work with this package’s abstractions.users table (with password, remember_token) differs from Nette’s UserStorage expectations (e.g., getIdentity() vs. Eloquent’s find()).IUserStorage removal, Passwords class changes), increasing migration risk.session()->put() vs. Nette’s sessionSection).nette/utils (required) may clash with Laravel’s illuminate/support, especially in service provider bootstrapping.Is the RBAC/ACL functionality worth the integration cost?
Gate/Policy system suffices, this package offers no clear advantage.spatie/laravel-permission may be better.Can session handling be made compatible?
SessionStorage without custom wrappers?How would this interact with Laravel’s auth stack?
Auth::user() need to be replaced with User::getIdentity()?Passwords class) integrate with Laravel’s Hash facade?What’s the long-term maintenance cost?
spatie/laravel-permission, entrust.laravel/sanctum for API tokens.Assess necessity:
spatie/laravel-permission (more Laravel-native).session()->invalidate()).Adapter layer (high effort):
nette/security components.UserStorage to bridge with Eloquent models.User::getIdentity() instead of Auth::user().Hybrid approach (risky):
nette/security only for ACL while keeping Laravel’s auth system.Authorizator into Laravel’s Policy classes.nette/utils (v4.0+) may conflict with Laravel’s illuminate/support.SessionStorage.Gate system.nette/security evolve.nette/security is less actively maintained than Laravel’s core auth system.nette/security in high-traffic Laravel apps.auth.attempting) would need rewiring to work with this package.SessionStorage behaves differently than Laravel’s session driver, users may experience unexpected logouts or stale sessions.nette/security stagnates, the project could break with Laravel updates.Authenticator, and Authorizator abstractions.Recommendation: Do not adopt for Laravel projects. The integration effort outweighs the benefits, and Laravel-native alternatives (spatie/laravel-permission, Breeze/Fortify) provide better compatibility, support, and long-term viability. If RBAC/ACL is the primary need, evaluate spatie/laravel-permission instead.
How can I help you explore Laravel packages today?