• 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/Service/OpenIdService.php
1
<?php
2

3
declare(strict_types=1);
4

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

12
namespace T3G\Bundle\Keycloak\Service;
13

14
use GuzzleHttp\Client;
15
use Symfony\Component\Cache\Adapter\ArrayAdapter;
16
use Symfony\Component\Cache\Adapter\ChainAdapter;
17
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
18
use Symfony\Contracts\Cache\ItemInterface;
19

20
class OpenIdService
21
{
22
    public function getOpenIdConfiguration(string $realmUrl)
23
    {
NEW
24
        $cacheChain = new ChainAdapter([
×
NEW
25
            new ArrayAdapter(),
×
NEW
26
            new FilesystemAdapter(),
×
NEW
27
        ]);
×
28

NEW
29
        return $cacheChain->get('keycloak-openid-' . hash('xxh3', $realmUrl), function (ItemInterface $item) use ($realmUrl) {
×
NEW
30
            $item->expiresAfter(3600);
×
31

NEW
32
            $client = new Client();
×
NEW
33
            $response = $client->request('GET', $realmUrl . '/.well-known/openid-configuration');
×
34

NEW
35
            return json_decode((string)$response->getBody(), true, 512, JSON_THROW_ON_ERROR);
×
NEW
36
        });
×
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

© 2025 Coveralls, Inc