nette / security

🔑 Provides authentication, authorization and a role-based access control management via ACL (Access Control List)
https://doc.nette.org/access-control
Other
357 stars 40 forks source link

Flag `CLEAR_IDENTITY` is not present in `UserStorage` #62

Closed simPod closed 3 years ago

simPod commented 3 years ago

Version: 3.1

Bug Description

setExpiration() says Accepts flag IUserStorage::CLEAR_IDENTITY

IUserStorage is deprecated in favor of UserStorage

UserStorage has no CLEAR_IDENTITY constant.

Possible Solution

Introduce CLEAR_IDENTITY constant to UserStorage

dg commented 3 years ago

With the advent of named parameters in PHP, the preferred use will be setExpiration(clearIdentity: true).

https://github.com/nette/security/blob/v3.1.4/src/Security/User.php#L262-L268