Closed
Description
Symfony version(s) affected
5.4.x
Description
The customAuthenticators()
method does not exist on FirewallConfig
. I can use yaml with custom_authenticator
, but it seems impossible via PHP config using the FirewallConfig
object. If you simply pass an array configuration to ContainerConfig with custom_authenticators
it works, but there are benefits to using the config objects. I’ve tried the verbatim config from the documentation and it doesn’t work:
https://symfony.com/doc/5.x/security/custom_authenticator.html
I see no customAuthebticators()
method anywhere in symfony core. The FirewallConfig
I’m using is under var/cache/dev/Symfony/Config/
How to reproduce
Use the exact code from documentation
use App\Security\ApiKeyAuthenticator;
use Symfony\Config\SecurityConfig;
return static function (SecurityConfig $security) {
$security->enableAuthenticatorManager(true);
// ....
$security->firewall('main')
->customAuthenticators([ApiKeyAuthenticator::class])
;
};
Possible Solution
No response
Additional Context
No response