contributte / event-security-bridge
Bridge between event dispatcher and nette security
Fund package maintenance!
f3l1x
contributte.org/partners.html
Installs: 31 531
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >= 5.6
- nette/di: ^2.4.8
- nette/security: ^2.4.1
Requires (Dev)
- contributte/event-dispatcher: ^0.3.0
- ninjify/nunjuck: ^0.1.4
- ninjify/qa: ^0.3.3
This package is auto-updated.
Last update: 2021-06-28 10:55:31 UTC
README
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
Composer | contributte/event-security-bridge |
---|---|
Version | |
PHP | |
License |
Versions
State | Version | Branch | PHP |
---|---|---|---|
stable | ^0.1 |
master |
>= 5.6 |
Usage 🎉
extensions: events: Contributte\EventDispatcher\DI\EventDispatcherExtension events2security: Contributte\Events\Bridges\Security\DI\EventSecurityBridgeExtension
Bridge 🔧
There are several Nette Security events on which you can listen to.
use Contributte\Events\Bridges\Security\Event\LoggedInEvent; use Contributte\Events\Bridges\Security\Event\LoggedOutEvent;
LoggedInEvent::NAME
&&SecurityEvents::ON_LOGGED_IN
LoggedOutEvent::NAME
&&SecurityEvents::ON_LOGGED_OUT
Subscriber 💡
use Contributte\EventDispatcher\EventSubscriber; use Contributte\Events\Bridges\Security\Event\LoggedInEvent; use Contributte\Events\Bridges\Security\Event\SecurityEvents; final class LoggedInSubscriber implements EventSubscriber { /** * @return array */ public static function getSubscribedEvents() { return [SecurityEvents::ON_LOGGED_IN => 'onLoggedIn']; } /** * @param LoggedInEvent $event * @return void */ public function onLoggedIn(LoggedInEvent $event) { // do magic } }
Development
This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.