Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (32 sloc) 1.033 kb
<?php
/*
* This file is part of the KnpOAuthBundle package.
*
* (c) KnpLabs <hello@knplabs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Knp\Bundle\OAuthBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle,
Symfony\Component\DependencyInjection\ContainerBuilder;
use Knp\Bundle\OAuthBundle\DependencyInjection\Security\Factory\OAuthFactory,
Knp\Bundle\OAuthBundle\Security\Core\UserProvider\EntityFactory;
/**
* KnpOAuthBundle
*
* @author Geoffrey Bachelet <geoffrey.bachelet@gmail.com>
*/
class KnpOAuthBundle extends Bundle
{
/**
* {@inheritDoc}
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$extension = $container->getExtension('security');
$extension->addSecurityListenerFactory(new OAuthFactory());
$extension->addUserProviderFactory(new EntityFactory('entity', 'doctrine.orm.security.user.provider'));
}
}
Jump to Line
Something went wrong with that request. Please try again.