Skip to content

Instantly share code, notes, and snippets.

View romaricdrigon's full-sized avatar

Romaric Drigon romaricdrigon

  • Lausanne, Switzerland
View GitHub Profile
@romaricdrigon
romaricdrigon / UnauthorizedAjaxListener.php
Created August 21, 2013 07:13
Symfony2 + AngularJS de-authentification handling
<?php
namespace Acme\DemoBundle\EventListener;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\Security\Core\Exception\AuthenticationException;