• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TYPO3GmbH / symfony-keycloak-bundle / 14438360102

14 Apr 2025 05:44AM UTC coverage: 4.386% (-0.4%) from 4.739%
14438360102

Pull #20

github

web-flow
Merge 5a241d446 into 464b21466
Pull Request #20: [BUGFIX] Add logout event listener for SSO logout

0 of 21 new or added lines in 3 files covered. (0.0%)

2 existing lines in 1 file now uncovered.

10 of 228 relevant lines covered (4.39%)

9.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/EventSubscriber/LogoutSubscriber.php
1
<?php declare(strict_types=1);
2

3
/*
4
 * This file is part of the package t3g/symfony-keycloak-bundle.
5
 *
6
 * For the full copyright and license information, please read the
7
 * LICENSE file that was distributed with this source code.
8
 */
9

10
namespace T3G\Bundle\Keycloak\EventSubscriber;
11

12
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
13
use Symfony\Component\HttpFoundation\RedirectResponse;
14
use Symfony\Component\Routing\RouterInterface;
15
use Symfony\Component\Security\Http\Event\LogoutEvent;
16

17
class LogoutSubscriber implements EventSubscriberInterface
18
{
19
    private RouterInterface $router;
20

21
    public function __construct(RouterInterface $router)
22
    {
NEW
23
        $this->router = $router;
×
24
    }
25

26
    public static function getSubscribedEvents(): array
27
    {
NEW
28
        return [
×
NEW
29
            LogoutEvent::class => ['onLogout', 10],
×
NEW
30
        ];
×
31
    }
32

33
    public function onLogout(LogoutEvent $logoutEvent): void
34
    {
NEW
35
        $logoutRoute = $this->router->generate('t3g_keycloak_logout');
×
NEW
36
        $logoutEvent->setResponse(new RedirectResponse($logoutRoute));
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc