Skip to content

Inconsistency in security factories #22473

Closed
@Toflar

Description

@Toflar
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version all

I've implemented my own security authentication using a custom factory as e.g. described in the docs here.
I read the source code in SecurityExtension carefully and as far as I could see, thanks to the support for factories and the AbstractFactory I was able to quickly have my own listener, provider etc. registered. Configuring it in my security.yml was as easy as this:

firewall_name:
    pattern: ~
    anonymous: true
    my_factory_key: { my_factory_settings: foobar }

However, this does not work for logout. As you can see here, logout has to be explicitly defined on the firewall so I cannot just use my factory to provide my own logout listeners. I would like to replace the logout listener because I don't want it to check for a path but for request parameters to be present.
I just wonder if this is on purpose or if this is actually an inconsistency? Maybe anyone can tell me :-)

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