Symfony 6 is security.enable_authenticator_manager a redundant setting?
Asked Answered
K

1

10

I have an authenticator class which extends AbstractLoginFormAuthenticator and I declared it with the security.firewalls.main.custom_authenticator setting.

However, I omitted to set the security.enable_authenticator_manager setting - but everything works just as expected with no extra deprecations etc. I guess that when enable_authenticator_manager is not set it defaults to false, but the authenticator class is used anyway. What's the purpose of this setting?

Kopeisk answered 12/9, 2022 at 7:22 Comment(2)
It was used in Symfony 5 to select between the older Guard based authentication and the newer Http authentication. Since the Guard software is now completely removed in Symfony 6 then the setting is no longer needed. I suppose eventually it will be removed.Maneating
It is deprecated now in 6.2. github.com/symfony/symfony/pull/47890Gent
B
13

Symfony introduced a new authentication manager in 5.1. Setting security.enable_authenticator_manager allowed you to opt into it.

From 6.0 the new authentication manager was mandatory, and from 6.2 this setting was deprecated altogether.

To summarise, do not set this from Symfony 6.2 onwards.

Broeder answered 13/7, 2023 at 15:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.