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

TYPO3GmbH / symfony-keycloak-bundle / 14440499152

14 Apr 2025 08:01AM UTC coverage: 4.425% (-0.3%) from 4.739%
14440499152

Pull #20

github

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

0 of 22 new or added lines in 5 files covered. (0.0%)

10 of 226 relevant lines covered (4.42%)

9.45 hits per line

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

0.0
/src/Controller/LoginController.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\Controller;
11

12
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
13
use Symfony\Component\HttpFoundation\RedirectResponse;
14
use T3G\Bundle\Keycloak\Service\RedirectService;
15

16
class LoginController extends AbstractController
17
{
18
    private RedirectService $redirectService;
19
    private string $logoutRoute;
20

21
    public function __construct(RedirectService $redirectService, string $logoutRoute)
22
    {
23
        $this->redirectService = $redirectService;
×
NEW
24
        $this->logoutRoute = $logoutRoute;
×
25
    }
26

27
    public function login(): RedirectResponse
28
    {
29
        if (null !== $this->getUser()) {
×
30
            return $this->redirectToRoute($this->getParameter('t3g_keycloak.routes.success'));
×
31
        }
32

33
        return $this->redirectService->generateLoginRedirectResponse();
×
34
    }
35

36
    public function oauthCallback(): RedirectResponse
37
    {
38
        // fallback in case the authenticator does not redirect
39
        return $this->redirectToRoute($this->getParameter('t3g_keycloak.routes.success'));
×
40
    }
41

42
    public function oauthLogout(): RedirectResponse
43
    {
NEW
44
        return $this->redirectService->generateLogoutRedirectResponse($this->logoutRoute);
×
45
    }
46
}
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

© 2025 Coveralls, Inc