nette-securitylisted
Install: claude install-skill nette/agent-plugins
## Nette Security
Installed with `composer require nette/security`. The framework registers `security.user` (`Nette\Security\User`), `security.passwords`, `security.userStorage`, plus `security.authenticator` / `security.authorizator` when the `security:` config section defines them. All are autowired – inject `Nette\Security\User` or `Nette\Security\Passwords` by type; in presenters use `$this->getUser()`.
### Current names vs. Nette 2.x names
Using an old name still "works" (aliases/deprecated stubs exist), which makes the mistake silent. Always write the current one:
| Current (all in `Nette\Security\`) | Deprecated 2.x name |
|---|---|
| `SimpleIdentity` | `Identity` |
| `Authenticator` | `IAuthenticator` – a **different, array-based** `authenticate(array $credentials)` contract; never implement it |
| `Authorizator`, `Role`, `Resource` | `IAuthorizator`, `IRole`, `IResource` |
| `Authenticator::IdentityNotFound`, `InvalidCredential` | `IDENTITY_NOT_FOUND`, `INVALID_CREDENTIAL` |
| `Authorizator::All`, `Allow`, `Deny` | `ALL`, `ALLOW`, `DENY` |
| `User::LogoutManual`, `LogoutInactivity` | `LOGOUT_MANUAL`/`MANUAL`, `LOGOUT_INACTIVITY`/`INACTIVITY` |
### Authenticator
```php
// interface Nette\Security\Authenticator – error codes: IdentityNotFound, InvalidCredential, Failure, NotApproved
function authenticate(string $username, string $password): IIdentity;
```
`InvalidCredential` is **singular**, no trailing `s`. The error code is the exception's second argument:
``