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\DependencyInjection\Component\Grant\ResourceOwnerPasswordCredential;
use OAuth2Framework\Bundle\DependencyInjection\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;
final class ResourceOwnerPasswordCredentialSource implements Component
{
/**
* {@inheritdoc}
public function name(): string
return 'resource_owner_password_credential';
}
public function load(array $configs, ContainerBuilder $container)
if ($configs['grant']['resource_owner_password_credential']['enabled']) {
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../../Resources/config/grant'));
$loader->load('resource_owner_password_credential.php');
public function getNodeDefinition(NodeDefinition $node)
$node->children()
->arrayNode('resource_owner_password_credential')
->canBeEnabled()
->end()
->end();
public function prepend(ContainerBuilder $container, array $config): array
//Nothing to do
return [];