8000 Update HttpBasicLdapFactory by nietonfir · Pull Request #1 · lsmith77/symfony · GitHub
[go: up one dir, main page]

Skip to content

Update HttpBasicLdapFactory #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on G 8000 itHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class HttpBasicLdapFactory extends HttpBasicFactory
public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint)
{
$provider = 'security.authentication.provider.ldap_bind.'.$id;
$container
$definition = $container
->setDefinition($provider, new ChildDefinition('security.authentication.provider.ldap_bind'))
->replaceArgument(0, new Reference($userProvider))
->replaceArgument(1, new Reference('security.user_checker.'.$id))
Expand All @@ -40,6 +40,11 @@ public function create(ContainerBuilder $container, $id, $config, $userProvider,
// entry point
$entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPoint);


if (!empty($config['query_string'])) {
$definition->addMethodCall('setQueryString', array($config['query_string']));
}

// listener
$listenerId = 'security.authentication.listener.basic.'.$id;
$listener = $container->setDefinition($listenerId, new ChildDefinition('security.authentication.listener.basic'));
Expand All @@ -57,6 +62,7 @@ public function addConfiguration(NodeDefinition $node)
->children()
->scalarNode('service')->defaultValue('ldap')->end()
->scalarNode('dn_string')->defaultValue('{username}')->end()
->scalarNode('query_string')->end()
->end()
;
}
Expand Down
0