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\Bundle\Component\Endpoint\TokenIntrospection;
use OAuth2Framework\Bundle\Component\Component;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
class TokenIntrospectionEndpointSource implements Component
{
/**
* @return string
public function name(): string
return 'token_introspection';
}
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
if (!$configs['endpoint']['token_introspection']['enabled']) {
return;
$container->setParameter('oauth2_server.endpoint.token_introspection.path', $configs['endpoint']['token_introspection']['path']);
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config/endpoint/token_introspection'));
$loader->load('introspection.php');
public function getNodeDefinition(NodeDefinition $node)
$node->children()
->arrayNode($this->name())
->addDefaultsIfNotSet()
->canBeEnabled()
->children()
->scalarNode('path')
->info('The token introspection endpoint path')
->defaultValue('/token/introspection')
->end()
->end();
public function build(ContainerBuilder $container)
//Nothing to do
public function prepend(ContainerBuilder $container, array $config): array
return [];