Skip to content

Instantly share code, notes, and snippets.

View hansgrinwis's full-sized avatar

Hans Grinwis hansgrinwis

  • Gorinchem, NL
View GitHub Profile
@hansgrinwis
hansgrinwis / LogoutSubscriber.php
Last active November 20, 2020 20:46
Symfony JSON logout (json_logout, logout via AJAX call)
<?php
declare(strict_types=1);
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Event\LogoutEvent;