Configuring Access Control
Overview of configuration options for the Nette Security.
If you are not using the whole framework, but only this library, read how to load the configuration.
You can define a list of users in the configuration to create a simple authenticator
(Nette\Security\SimpleAuthenticator
). Because passwords are readable in the configuration, this solution is for
testing purposes only.
You can also define roles and resources to create a basis for authorizer
(Nette\Security\Permission
):
User Storage
You can configure how to store information about the logged in user:
If you choose cookie
as your repository, you can also set the following options:
DI Services
These services are added to the DI container:
Name | Type | Description |
---|---|---|
security.authenticator |
Nette\Security\Authenticator | authenticator |
security.authorizator |
Nette\Security\Authorizator | authorizer |
security.passwords |
Nette\Security\Passwords | password hashing |
security.user |
Nette\Security\User | current user |
security.userStorage |
Nette\Security\UserStorage | storage |