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

Appearance settings

FirewallConfig::customAuthenticators() method does not exist: cannot configure CustomAuthenticator via PHP #53987

Copy link
Copy link
Closed
@arderyp

Description

@arderyp
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.