addConfiguration() public method

public addConfiguration ( Symfony\Component\Config\Definition\Builder\NodeDefinition $node )
$node Symfony\Component\Config\Definition\Builder\NodeDefinition
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->scalarNode('login_path')->cannotBeEmpty()->isRequired()->end();
     $this->addOAuthProviderConfiguration($node);
     $this->addResourceOwnersConfiguration($node);
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     // it isn't done in constructor because parent::addConfiguration cannot handle array default value
     $this->addOption('required_attributes', array());
     $this->addOption('optional_attributes', array());
     $node->children()->scalarNode('relying_party')->defaultValue('fp_openid.relying_party.default')->cannotBeEmpty()->end()->arrayNode('required_attributes')->prototype('scalar')->end()->end()->arrayNode('optional_attributes')->prototype('scalar')->end()->end()->end();
 }
Beispiel #3
0
    public function addConfiguration(NodeBuilder $builder)
    {
        parent::addConfiguration($builder);

        $builder
            ->scalarNode('csrf_provider')->cannotBeEmpty()->end()
        ;
    }
Beispiel #4
0
    public function addConfiguration(NodeDefinition $node)
    {
        parent::addConfiguration($node);

        $node
            ->children()
                ->scalarNode('csrf_provider')->cannotBeEmpty()->end()
            ->end()
        ;
    }
Beispiel #5
0
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->beforeNormalization()->ifTrue(function ($v) {
         return isset($v['csrf_provider']) && isset($v['csrf_token_generator']);
     })->thenInvalid("You should define a value for only one of 'csrf_provider' and 'csrf_token_generator' on a security firewall. Use 'csrf_token_generator' as this replaces 'csrf_provider'.")->end()->beforeNormalization()->ifTrue(function ($v) {
         return isset($v['csrf_provider']);
     })->then(function ($v) {
         @trigger_error("Setting the 'csrf_provider' configuration key on a security firewall is deprecated since version 2.8 and will be removed in 3.0. Use the 'csrf_token_generator' configuration key instead.", E_USER_DEPRECATED);
         $v['csrf_token_generator'] = $v['csrf_provider'];
         unset($v['csrf_provider']);
         return $v;
     })->end()->children()->scalarNode('csrf_token_generator')->cannotBeEmpty()->end()->end();
 }
 /**
  * {@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}
  */
 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()->scalarNode('relying_party')->defaultValue(null)->end()->scalarNode('login_path')->defaultValue('/saml/sp/login')->cannotBeEmpty()->end()->scalarNode('check_path')->defaultValue('/saml/sp/acs')->cannotBeEmpty()->end()->scalarNode('logout_path')->defaultValue('/saml/sp/logout')->cannotBeEmpty()->end()->scalarNode('failure_path')->defaultValue('/saml/sp/failure')->cannotBeEmpty()->end()->scalarNode('metadata_path')->defaultValue('/saml/sp/FederationMetadata.xml')->cannotBeEmpty()->end()->scalarNode('discovery_path')->defaultValue('/saml/sp/discovery')->cannotBeEmpty()->end()->scalarNode('local_logout_path')->defaultValue('/logout')->cannotBeEmpty()->end()->booleanNode('create_user_if_not_exists')->defaultFalse()->end()->arrayNode('services')->isRequired()->requiresAtLeastOneElement()->useAttributeAsKey('name')->prototype('array')->children()->arrayNode('idp')->isRequired()->children()->scalarNode('file')->end()->scalarNode('entity_id')->end()->scalarNode('id')->end()->end()->end()->arrayNode('sp')->addDefaultsIfNotSet()->children()->arrayNode('config')->addDefaultsIfNotSet()->children()->scalarNode('entity_id')->cannotBeEmpty()->isRequired()->end()->scalarNode('base_url')->defaultValue(null)->end()->booleanNode('want_assertions_signed')->cannotBeEmpty()->defaultFalse()->end()->end()->end()->arrayNode('signing')->addDefaultsIfNotSet()->children()->scalarNode('id')->cannotBeEmpty()->end()->scalarNode('cert_file')->cannotBeEmpty()->end()->scalarNode('key_file')->cannotBeEmpty()->end()->scalarNode('key_pass')->end()->end()->end()->arrayNode('meta')->addDefaultsIfNotSet()->children()->scalarNode('id')->end()->enumNode('name_id_format')->values(array('persistent', 'transient'))->cannotBeEmpty()->defaultValue('persistent')->end()->booleanNode('suppress_name_id_policy')->defaultFalse()->end()->arrayNode('binding')->addDefaultsIfNotSet()->children()->enumNode('authn_request')->values(array('redirect', 'post'))->defaultValue('redirect')->cannotBeEmpty()->end()->enumNode('response')->values(array('redirect', 'post'))->defaultValue('post')->cannotBeEmpty()->end()->enumNode('logout_request')->values(array('redirect', 'post'))->defaultValue('redirect')->cannotBeEmpty()->end()->end()->end()->end()->end()->end()->end()->end()->end()->end()->end();
 }
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->children()->arrayNode('created_users_roles')->prototype('scalar')->end()->end()->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();
 }
 public function addConfiguration(NodeDefinition $node)
 {
     /** @var ArrayNodeDefinition $node */
     parent::addConfiguration($node);
     $node->treatTrueLike(array())->children()->scalarNode('oauth_start_path')->defaultValue('/appsco/start')->cannotBeEmpty()->end()->scalarNode('oauth_callback_path')->defaultValue('/appsco/callback')->cannotBeEmpty()->end()->end();
 }
Beispiel #12
0
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->booleanNode('direct_entry')->defaultTrue()->end();
 }
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $node->children()->scalarNode('client_id')->defaultValue('')->end()->scalarNode('client_secret')->defaultValue('')->end()->scalarNode('redirect_uri')->defaultValue('http://www.example.com')->end()->scalarNode('scope')->defaultValue('basic')->end()->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
 }
Beispiel #15
0
 /**
  * {@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();
 }
 /**
  * @param NodeDefinition $node
  */
 public function addConfiguration(NodeDefinition $node)
 {
     parent::addConfiguration($node);
     $builder = $node->children();
     $builder->booleanNode('create_users')->defaultFalse()->end();
 }