Nette Documentation Preview

syntax
Upgrading
*********


Upgrading to Version 3.1
========================

- the `Nette\Security\Authenticator` interface differs from `IAuthenticator` in the signature of the `authenticate(string $user, string $password)` method
- the `Nette\Security\UserStorage` interface differs from `Nette\Security\IUserStorage`
- the class `Nette\Security\Identity` was renamed to `Nette\Security\SimpleIdentity` so that in the distant future the interface `Nette\Security\IIdentity` can be renamed to `Identity`
- the interface `Nette\Security\UserStorage`, which decides where the information about the logged-in user is kept, is brand new and differs from the original `Nette\Security\IUserStorage`; it is what `User::getStorage()` returns. Implementations storing the data in a session or in a cookie are available.
- an authenticator can implement the interface `Nette\Security\IdentityHandler` and thus influence what happens to the identity when it is saved to and restored from the storage, for example to refresh the roles

How to use `IdentityHandler` and how to build a website with logging in that needs no sessions at all is shown in the article [News in Nette Security 3.1 |https://blog.nette.org/en/news-in-nette-security-3-1].


Upgrading to Version 3.0
========================

- the `Nette\Security\Passwords` class is now used as an object, i.e. the methods are no longer static

{{maintitle: Upgrading Nette Security: What Changed in Each Version}}
{{description: What changed in Nette Security 4.0, 3.1 and 3.0 and how to update your code, including the move from authorizators to voters in version 4.0.}}

Upgrading

Upgrading to Version 3.1

How to use IdentityHandler and how to build a website with logging in that needs no sessions at all is shown in the article News in Nette Security 3.1.

Upgrading to Version 3.0