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\Core;
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 AccessTokenSource implements Component
{
/**
* {@inheritdoc}
public function name(): string
return 'access_token';
}
public function load(array $configs, ContainerBuilder $container)
$container->setAlias('oauth2_server.access_token.repository', $configs['access_token_repository']);
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../Resources/config/core'));
$loader->load('access_token.php');
public function getNodeDefinition(NodeDefinition $node)
$node->children()
->scalarNode('access_token_repository')
->info('The access token repository service')
->isRequired()
->end()
;
public function build(ContainerBuilder $container)
//Nothing to do
public function prepend(ContainerBuilder $container, array $config): array
return [];