Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09bed16

Browse files
committed
Only load old manager if new system is disabled
1 parentddf430f commit09bed16

File tree

4 files changed

+40
-25
lines changed

4 files changed

+40
-25
lines changed

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ public function load(array $configs, ContainerBuilder $container)
107107
$loader->load('security_listeners.xml');
108108
$loader->load('security_rememberme.xml');
109109

110+
if ($this->authenticatorManagerEnabled =$config['enable_authenticator_manager']) {
111+
$loader->load('security_authenticator.xml');
112+
}else {
113+
$loader->load('security_legacy.xml');
114+
}
115+
110116
if (class_exists(AbstractExtension::class)) {
111117
$loader->load('templating_twig.xml');
112118
}
@@ -141,10 +147,6 @@ public function load(array $configs, ContainerBuilder $container)
141147
$container->setParameter('security.access.always_authenticate_before_granting',$config['always_authenticate_before_granting']);
142148
$container->setParameter('security.authentication.hide_user_not_found',$config['hide_user_not_found']);
143149

144-
if ($this->authenticatorManagerEnabled =$config['enable_authenticator_manager']) {
145-
$loader->load('authenticators.xml');
146-
}
147-
148150
$this->createFirewalls($config,$container);
149151
$this->createAuthorization($config,$container);
150152
$this->createRoleHierarchy($config,$container);

‎src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,6 @@
4545
</service>
4646

4747
<!-- Authentication related services-->
48-
<serviceid="security.authentication.manager.provider"class="Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager">
49-
<argument /><!-- providers-->
50-
<argument>%security.authentication.manager.erase_credentials%</argument>
51-
<callmethod="setEventDispatcher">
52-
<argumenttype="service"id="event_dispatcher" />
53-
</call>
54-
</service>
55-
<serviceid="security.authentication.manager.authenticator"class="Symfony\Component\Security\Http\Authentication\AuthenticatorManager">
56-
<argument /><!-- authenticators-->
57-
<argumenttype="service"id="event_dispatcher" />
58-
<argument>%security.authentication.manager.erase_credentials%</argument>
59-
<callmethod="setEventDispatcher">
60-
<argumenttype="service"id="event_dispatcher" />
61-
</call>
62-
</service>
63-
<serviceid="security.authentication.manager"alias="security.authentication.manager.provider"/>
64-
<serviceid="Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface"alias="security.authentication.manager" />
65-
6648
<serviceid="security.authentication.trust_resolver"class="Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" />
6749

6850
<serviceid="security.authentication.session_strategy"class="Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy">

‎src/Symfony/Bundle/SecurityBundle/Resources/config/authenticators.xml‎renamed to ‎src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.xml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
55

66
<services>
7+
<!-- Manager-->
8+
9+
<serviceid="security.authentication.manager.authenticator"class="Symfony\Component\Security\Http\Authentication\AuthenticatorManager">
10+
<argumenttype="abstract">authenticators</argument>
11+
<argumenttype="service"id="event_dispatcher" />
12+
<argument>%security.authentication.manager.erase_credentials%</argument>
13+
<callmethod="setEventDispatcher">
14+
<argumenttype="service"id="event_dispatcher" />
15+
</call>
16+
</service>
17+
<serviceid="Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface"alias="security.authentication.manager" />
18+
719
<serviceid="security.authenticator_handler"
820
class="Symfony\Component\Security\Http\Authentication\AuthenticatorHandler"
921
>
@@ -38,12 +50,12 @@
3850
<argumenttype="service"id="security.encoder_factory" />
3951
</service>
4052

41-
<serviceid="Symfony\Component\Security\Http\EventListener\PasswordMigratingListener">
53+
<serviceid="security.listener.password_migrating"class="Symfony\Component\Security\Http\EventListener\PasswordMigratingListener">
4254
<tagname="kernel.event_subscriber" />
4355
<argumenttype="service"id="security.encoder_factory" />
4456
</service>
4557

46-
<serviceid="Symfony\Component\Security\Http\EventListener\UserCheckerListener">
58+
<serviceid="security.listener.user_checker"class="Symfony\Component\Security\Http\EventListener\UserCheckerListener">
4759
<tagname="kernel.event_subscriber" />
4860
<argumenttype="service"id="Symfony\Component\Security\Core\User\UserCheckerInterface" />
4961
</service>
@@ -53,7 +65,6 @@
5365
abstract="true">
5466
<tagname="monolog.logger"channel="security" />
5567
<argumenttype="abstract">remember me services</argument>
56-
<argumenttype="abstract">provider key</argument>
5768
<argumenttype="service"id="logger"on-invalid="null" />
5869
</service>
5970

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" ?>
2+
3+
<containerxmlns="http://symfony.com/schema/dic/services"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
6+
7+
<services>
8+
<defaultspublic="false" />
9+
10+
<!-- Authentication related services-->
11+
<serviceid="security.authentication.manager"class="Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager">
12+
<argument /><!-- providers-->
13+
<argument>%security.authentication.manager.erase_credentials%</argument>
14+
<callmethod="setEventDispatcher">
15+
<argumenttype="service"id="event_dispatcher" />
16+
</call>
17+
</service>
18+
<serviceid="Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface"alias="security.authentication.manager" />
19+
</services>
20+
</container>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp