nattreid / security
Security extension for Nette Framework
1.8.0
2022-01-19 11:15 UTC
Requires
- php: >= 7.1
- jaybizzle/crawler-detect: ~1.2
- mobiledetect/mobiledetectlib: ~2.8
- nattreid/orm: ~1.0
- nette/application: ~2.4
- nette/di: ~2.4
- nette/security: ~2.4
Requires (Dev)
- kdyby/translation: ~2.4
- nattreid/app-manager: ~1.0
- nette/tester: ~1.7
- tracy/tracy: ~2.4
- dev-master / 1.x-dev
- 1.8.0
- 1.7.10
- 1.7.8
- 1.7.7
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8.3
- 1.0.8.2
- 1.0.8.1
- 1.0.8
- 1.0.7.1
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dev-1.x
This package is auto-updated.
Last update: 2024-12-19 18:02:06 UTC
README
Databázové ACL, uživatelé, authentizace a autorizace
Nastavení
Nastavení v config.neon
extensions: securityExt: NAttreid\Security\DI\SecurityExtension
dostupné nastavení
securityExt: namespace: 'user' authenticator: front: App\FrontAuthenticator
A přidat do orm model. V příkladu je extension orm pod názvem orm
orm: add: - NAttreid\Security\Model\Orm
Authenticator
class FrontAuthenticator implements \NAttreid\Security\Authenticator\IAuthenticator { public function authenticate(array $credentials): Identity { // php code } public function getIdentity(int $userId): Identity { // php code } }
TryUser
Komponenta pro dočasnou změnu identity uživatele
V BasePresenteru přidejte komponentu
/** @inject */ public $tryUserFactory; protected function startup() { parent::startup(); $this['tryUser']->init(); } protected function createComponentTryUser() { $control = $this->tryUserFactory->create(":Link:Nekam:"); $control->permission = 'nazev.prav.pro.komponentu'; return $control; }