nette/security
🔑 Nette Security: provides authentication, authorization and a role-based access control management via ACL (Access Control List)
v3.2.6
9.9M downloads/mo
#2326 most downloaded on Packagist
nette/security
What this package is like to depend on
Last release 1 months ago
24 Jul 2026
Release timing varies
gaps range from 2 weeks to 13 months
Some releases are documented
notes for 9 of 34 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
34 releases · first in 2014
4 releases in the last 12 months
see the full history below
Release timeline
33 releases · Jun 2014 to Jul 2026Releases
latest 34-
v3.2.624 Jul 2026Release notes
Open source →✨ New Features
- Hashed passwords in
SimpleAuthenticator– stored passwords may now be crypt-format hashes (anythingpassword_hash()produces) and can be freely mixed with plain-text ones. The format is detected automatically, so hashes just work in thesecurity: users:config section with no extra option. A hash whose algorithm the PHP build doesn't know fails closed instead of being compared as plain text, and plain-text comparison is timing-safe. Passwords::bcrypt()andPasswords::argon2id()– name the algorithm instead of jugglingPASSWORD_*constants and options arrays:Passwords::bcrypt(12)orPasswords::argon2id(memoryCost: 65536). Omitted parameters keep PHP's defaults, andargon2id()fails with a clear exception on builds without Argon2 support.- ACL rules in the configuration – the new
rulessection lets you define permissions declaratively next to your roles and resources:Each rule issecurity: rules: allow: - [guest, article, view] - [registered, comment, [add, edit]] - [admin] deny: - [banned, comment, add]
[role(s), resource(s), privilege(s)]; an omitted or null item means "all", and a bare string grants or revokes everything for that role. Malformed rules are rejected at config time, not at runtime.
🐛 Bug Fixes
logout()no longer touches the storage when there is nothing to change, so logging out a guest doesn't needlessly regenerate the session ID or overwrite the logout reason. A stored authentication vetoed bywakeupIdentity()(a revoked token, say) is still properly cleared.Permission::isAllowed()now saves and restores the queried role and resource, making it re-entrant and exception-safe – an assertion callback can callisAllowed()again without corrupting the results of the outer query.
- Hashed passwords in
-
v3.2.515 Jun 2026Release notes
Open source →- fixed compatibility with nette/http 3.4
- Identity: use ctype_digit for stricter numeric ID detection
-
v3.2.423 May 2026Release notes
Open source →-
Guest identity – an
IdentityHandlerauthenticator may now implementgetGuestIdentity(): ?IIdentityto hand anonymous visitors a real identity. When present,getIdentity(),getId()andgetRoles()transparently fall back to it, so guests carry their own roles and data instead of just the$guestRolestring. The guest identity is resolved on read only and never written to storage. -
$persistIdentity – the new
User::$persistIdentityproperty lets you decide what happens to the identity after logout or expiration. It stays available for personalization by default; flip it tofalseandgetIdentity()/getId()returnnullonce the user is no longer logged in. Configurable straight from thesecurity.authenticationDI section. -
SessionStorage no longer refreshes the sliding expiration timestamp once the session has already expired – an expired identity stays expired instead of being silently kept alive for another round
-
Adopted
nette/phpstan-rulesand made static analysis a mandatory part of the build, then resolved the errors it surfaced -
Improved phpDoc types and descriptions across the codebase
-
-
v3.2.311 May 2026Nothing published for this version
-
v3.2.201 Aug 2025 -
v3.2.104 Nov 2024Release notes
Open source → -
v3.2.021 Jan 2024Release notes
Open source →- requires PHP 8.1
- uses PHP 8.1 features
- removed deprecated IUserStorage (BC break)
-
v3.1.818 Oct 2023Release notes
Open source →- support for PHP 8.3
- constants are PascalCase
- used #[\SensitiveParameter] to mark sensitive parameters
-
v3.1.718 Jan 2023 -
v3.1.612 Oct 2022Release notes
Open source →- CookieStorage: getState returns the previously set ID #67
- CookieStorage: fixed SameSite attribute
SessionStorage::setExpiration()does not overwrite data in the session- SimpleAuthenticator: refactoring, added
verifyPassword() - strict type fix
- coding style
-
v3.1.520 Sep 2021Nothing published for this version
-
v3.1.425 Aug 2021Nothing published for this version
-
v3.1.318 Jan 2021Nothing published for this version
-
v3.1.205 Jan 2021Nothing published for this version
-
v3.1.0no dateNothing published for this version
-
v3.0.625 Aug 2021Nothing published for this version
-
v3.0.502 Nov 2020Nothing published for this version
-
v3.0.427 May 2020Nothing published for this version
-
v3.0.313 Jan 2020Nothing published for this version
-
v3.0.216 Oct 2019Nothing published for this version
-
v3.0.114 Apr 2019Nothing published for this version
-
v2.4.417 Oct 2018Nothing published for this version
-
v2.4.302 Apr 2018Nothing published for this version
-
v2.4.211 Jul 2017Nothing published for this version
-
v2.4.119 Dec 2016Nothing published for this version
-
v2.4.017 May 2016Nothing published for this version
-
v2.3.217 May 2016Nothing published for this version
-
v2.3.111 Jul 2015Nothing published for this version
-
v2.3.024 Feb 2015Nothing published for this version
-
v2.2.419 Jul 2015Nothing published for this version
-
v2.2.320 Feb 2015Nothing published for this version
-
v2.2.214 Dec 2014Nothing published for this version
-
v2.2.105 Nov 2014Nothing published for this version
-
v2.2.024 Jun 2014Nothing published for this version