for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Spomky-Labs
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\ServerBundle\Component\Endpoint\Authorization\Compiler;
use OAuth2Framework\Component\AuthorizationEndpoint\User\UserAuthenticationCheckerManager;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
class UserAuthenticationCheckerCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
if (!$container->hasDefinition(UserAuthenticationCheckerManager::class)) {
return;
}
$definition = $container->getDefinition(UserAuthenticationCheckerManager::class);
$taggedServices = $container->findTaggedServiceIds('oauth2_server_user_authentication_checker');
foreach ($taggedServices as $id => $attributes) {
$definition->addMethodCall('add', [new Reference($id)]);