Skip to content

Commit c93f93d

Browse files
committed
[SecurityBundle] Simplify LDAP factories
1 parent 5e2a154 commit c93f93d

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

DependencyInjection/Security/Factory/FormLoginLdapFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,4 @@ public function addConfiguration(NodeDefinition $node)
6767
->end()
6868
;
6969
}
70-
71-
public function getKey()
72-
{
73-
return 'form-login-ldap';
74-
}
7570
}

DependencyInjection/Security/Factory/HttpBasicLdapFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,4 @@ public function addConfiguration(NodeDefinition $node)
8484
->end()
8585
;
8686
}
87-
88-
public function getKey()
89-
{
90-
return 'http-basic-ldap';
91-
}
9287
}

DependencyInjection/Security/Factory/JsonLoginLdapFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ class JsonLoginLdapFactory extends JsonLoginFactory
2626
{
2727
use LdapFactoryTrait;
2828

29-
public function getKey()
30-
{
31-
return 'json-login-ldap';
32-
}
33-
3429
protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId)
3530
{
3631
$provider = 'security.authentication.provider.ldap_bind.'.$id;

DependencyInjection/Security/Factory/LdapFactoryTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
*/
2828
trait LdapFactoryTrait
2929
{
30+
public function getKey(): string
31+
{
32+
return parent::getKey().'-ldap';
33+
}
34+
3035
public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string
3136
{
3237
$key = str_replace('-', '_', $this->getKey());

0 commit comments

Comments
 (0)