contributte/event-security-bridge

This package is abandoned and no longer maintained. The author suggests using the contributte/event-dispatcher-extra package instead.

Bridge between event dispatcher and nette security

v0.1 2017-07-04 14:45 UTC

This package is auto-updated.

Last update: 2021-06-28 10:55:31 UTC


README

68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77 68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534

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.

538058?v=3&s=80

Consider to support contributte development team. Also thank you for being used this package.