8000 Retrieve the current firewall name for a Request · Issue #14435 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Retrieve the current firewall name for a Request #14435
Closed
@trsteel88

Description

@trsteel88

I am trying to determine the current firewall name for a Request (application has multiple firewalls). Is this possible?

I can see a map is creating in SecurityExtension.php

However, I can't use this map as it is only available to the Firewall which doesn't expose a way to get the map. Secondly, from what I can see, the firewall name isn't stored anywhere for me to retrieve this as everything references services.

I can see that a ProviderKey() is available for some tokens (e.g UsernamePasswordToken). However, this method is not on the TokenInterface so I cannot rely on it.

Basically I want to add a generic EventListener for Authentication successes/failures. It needs to store the firewall name so it can be determined which firewall a user was trying to login to.

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

      0