Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] [Feature] Introduce firewall names in the Security class #32967

Closed
Arman-Hosseini opened this issue Aug 5, 2019 · 6 comments
Closed

Comments

@Arman-Hosseini
Copy link
Contributor

Arman-Hosseini commented Aug 5, 2019

Hello to all Symfony lovers.

I have 3 firewalls in my project for different users and tonight I noticed that the username I enter in the admin login form also appears in the user login form.
I noticed that the security class does not use the current firewall name for last username (that the user sent the request) into the following constants:

const LAST_USERNAME = '_security.last_username';

Tell me if there is a way. Otherwise let me submit a pull request.
Thanks.

@Arman-Hosseini Arman-Hosseini changed the title Introduse firewall names in Introduse firewall names in Security class Aug 5, 2019
@Arman-Hosseini Arman-Hosseini changed the title Introduse firewall names in Security class Introduce firewall names in Security class Aug 5, 2019
@Arman-Hosseini Arman-Hosseini changed the title Introduce firewall names in Security class Introduce firewall names in the Security class Aug 5, 2019
@Arman-Hosseini Arman-Hosseini changed the title Introduce firewall names in the Security class [Security] [Feature] Introduce firewall names in the Security class Aug 5, 2019
@Arman-Hosseini
Copy link
Contributor Author

@nicolas-grekas Please review and comment on this issue. thank you.

@nicolas-grekas
Copy link
Member

I don't know sorry, but please check the code and send a PR if you spot if/how this should be improved.

@Arman-Hosseini
Copy link
Contributor Author

Arman-Hosseini commented Nov 24, 2019

@nicolas-grekas I reviewed it but it has many dependencies.
Can this be added as a new feature to Symfony >= 4.4?

@Arman-Hosseini
Copy link
Contributor Author

@weaverryan Can you look into the matter and comment on it? Thank you.

@wouterj
Copy link
Member

wouterj commented Nov 24, 2019

Feel free to start a pull request changing this. I don't know the full code behind this/all implications, but from a usage point of view I think it makes sense to change this (even a not-working small PR showing the main idea is a good start for discussion).

@chalasr
Copy link
Member

chalasr commented Feb 20, 2020

I'm not sure to be aware of the full DX impact and BC considerations for this change.
So, as said, please feel free to start a PR so we can discuss the implementation.
Closing as the discussion seems to be staling now.

@chalasr chalasr closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants