Author: Fabien Potencier (fabien@symfony.com)
Author: Lukas Kahwe Smith (smith@pooteeweet.org)
Author: Johannes M. Schmitt (schmittjoh@gmail.com)
Inheritance: implements Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     if (isset($config['relying_party'])) {
         $container->getDefinition($listenerId)->addMethodCall('setRelyingParty', array(new Reference($config['relying_party'])));
     }
     return $listenerId;
 }
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     if (isset($config['csrf_provider'])) {
         $container->getDefinition($listenerId)->addArgument(new Reference($config['csrf_provider']));
     }
     return $listenerId;
 }
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     if ($config['use_twitter_anywhere']) {
         $container->getDefinition($listenerId)->addMethodCall('setUseTwitterAnywhere', array(true));
     }
     return $listenerId;
 }
 protected function createListener($container, $id, $config, $userProvider)
 {
     $this->addOption('login_path', $config['login_path']);
     $this->addOption('check_path', $config['check_path']);
     $this->addOption('logout_path', $config['logout_path']);
     $this->addOption('failure_path', $config['failure_path']);
     $this->addOption('metadata_path', $config['metadata_path']);
     $this->addOption('discovery_path', $config['discovery_path']);
     $this->addOption('local_logout_path', $config['local_logout_path']);
     $this->createServiceInfoCollection($container, $id, $config);
     $this->createStateStores($container, $id, $config);
     $this->createRelyingParties($container, $id, $config);
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     if ($config['relying_party']) {
         $container->getDefinition($listenerId)->addMethodCall('setRelyingParty', array(new Reference($config['relying_party'])));
     } else {
         $container->getDefinition($listenerId)->addMethodCall('setRelyingParty', array(new Reference('aerial_ship_saml_sp.relying_party.composite.' . $id)));
     }
     return $listenerId;
 }
 /**
  * @param NodeDefinition $node
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->booleanNode('create_users')->defaultFalse()->end();
 }
Exemple #6
0
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     $container->getDefinition($listenerId)->addArgument(isset($config['csrf_token_generator']) ? new Reference($config['csrf_token_generator']) : null);
     return $listenerId;
 }
 public function create(ContainerBuilder $container, $id, $config, $userProviderId, $defaultEntryPointId)
 {
     $this->options = array_intersect_key($config, $this->options);
     return parent::create($container, $id, $config, $userProviderId, $defaultEntryPointId);
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->children()->scalarNode('auth_provider')->cannotBeEmpty()->isRequired()->end()->scalarNode('client_id')->cannotBeEmpty()->isRequired()->end()->scalarNode('client_secret')->cannotBeEmpty()->isRequired()->end()->scalarNode('uid')->defaultNull()->end()->scalarNode('scope')->defaultValue('')->end()->scalarNode('failure_path')->cannotBeEmpty()->end();
 }
 /**
  * {@inheritDoc}
  */
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     $checkPaths = array();
     foreach ($config['resource_owners'] as $checkPath) {
         $checkPaths[] = $checkPath;
     }
     $container->getDefinition($listenerId)->addMethodCall('setResourceOwnerMap', array($this->getResourceOwnerMapReference($id)))->addMethodCall('setCheckPaths', array($checkPaths));
     return $listenerId;
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->arrayNode('resource_owners')->isRequired()->useAttributeAsKey('name')->prototype('scalar')->end()->validate()->ifTrue(function ($c) {
         $checkPaths = array();
         foreach ($c as $name => $checkPath) {
             if (in_array($checkPath, $checkPaths)) {
                 return true;
             }
             $checkPaths[] = $checkPath;
         }
         return false;
     })->thenInvalid("Each resource owner should have a unique check_path.")->end()->end()->arrayNode('oauth_user_provider')->isRequired()->children()->arrayNode('orm')->children()->scalarNode('class')->isRequired()->cannotBeEmpty()->end()->scalarNode('manager_name')->defaultNull()->end()->arrayNode('properties')->isRequired()->useAttributeAsKey('name')->prototype('scalar')->end()->end()->end()->end()->scalarNode('service')->cannotBeEmpty()->end()->scalarNode('oauth')->end()->arrayNode('fosub')->children()->arrayNode('properties')->isRequired()->useAttributeAsKey('name')->prototype('scalar')->end()->end()->end()->end()->end()->validate()->ifTrue(function ($c) {
         return 1 !== count($c) || !in_array(key($c), array('fosub', 'oauth', 'orm', 'service'));
     })->thenInvalid("You should configure (only) one of: 'fosub', 'oauth', 'orm', 'service'.")->end()->end()->scalarNode('login_path')->cannotBeEmpty()->isRequired()->end();
 }
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->children()->arrayNode('created_users_roles')->prototype('scalar')->end()->end()->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->scalarNode('oauth_provider')->defaultValue('oauth')->end()->scalarNode('authorization_url')->defaultNull()->end()->scalarNode('access_token_url')->defaultNull()->end()->scalarNode('infos_url')->defaultNull()->end()->scalarNode('username_path')->defaultNull()->end()->scalarNode('client_id')->cannotBeEmpty()->isRequired()->end()->scalarNode('scope')->isRequired()->end()->scalarNode('secret')->cannotBeEmpty()->isRequired()->end();
 }
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->children()->booleanNode('force')->defaultFalse()->end()->scalarNode('username_mapper')->defaultValue('light_saml_sp.username_mapper.simple')->end()->scalarNode('user_creator')->defaultNull()->end()->scalarNode('attribute_mapper')->defaultNull()->end()->end()->end();
 }
 protected function createListener($container, $id, $config, $userProvider)
 {
     $this->addOption('oauth_start_path', $config['oauth_start_path']);
     $this->addOption('oauth_callback_path', $config['oauth_callback_path']);
     return parent::createListener($container, $id, $config, $userProvider);
 }
Exemple #15
0
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->booleanNode('direct_entry')->defaultTrue()->end();
 }
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     $container->getDefinition($listenerId)->addMethodCall('setClient', array($config));
     return $listenerId;
 }
 /**
  * {@inheritDoc}
  */
 protected function createListener($container, $id, $config, $userProvider)
 {
     $listenerId = parent::createListener($container, $id, $config, $userProvider);
     $container->getDefinition($listenerId)->addMethodCall('setOwnerMap', array(new Reference('glory_oauth.ownermap')));
     return $listenerId;
 }