8000 [2.2] make refreshUser try all providers fixes #4498 · Pull Request #4778 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.2] make refreshUser try all providers fixes #4498 #4778

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

Closed
wants to merge 1 commit into from
Closed

[2.2] make refreshUser try all providers fixes #4498 #4778

wants to merge 1 commit into from

Conversation

ghost
Copy link
@ghost ghost commented Jul 7, 2012

Make refreshUser try all user providers instead stopping at the first
UserNotFound exception.

Make refreshUser try all user providers instead stopping at the first
UserNotFound exception.
@lsmith77
Copy link
Contributor

a provider should only be triggered if it supports the token and so imho if you have multiple providers that should work on the same token, it would be better to create a chained provider. changing this could have adverse affect on performance.

then again .. right now there is no way to control the order of the providers #2131 which means the order is accidental and not controllable anyway

@ghost
Copy link
Author
ghost commented Jul 13, 2012

A chained provider would not be the right solution as the use case is for different firewalls with different, seperately managed user providers that just happen to provide the same class of user object. refreshUser currently has no way of knowing which firewall was hit and which providers are in it, so it checks them all and stops at the first success or failure.

The current implementation requires each user provider to provide a user of a different class to all other user providers. If this is by design, it isn't documented and non-obvious.

@stof
Copy link
Member
stof commented Oct 13, 2012

@schmittjoh ping

@ghost
Copy link
ghost commented Jan 1, 2013

bump

@lyrixx
Copy link
Member
lyrixx commented Jan 1, 2013

This issue could be fixed with #4498 ?

@Renrhaf
Copy link
Renrhaf commented May 3, 2014

Yes, it could

@linaori
Copy link
Contributor
linaori commented Jul 31, 2014

Ran into this issue in 2.4 where multiple token/users on multiple firewalls with different authentication methods.

@fabpot
Copy link
Member
fabpot commented Jun 16, 2016

Closing this old PR as this is not the right fix. The one explained in #4498 might be better.

@fabpot fabpot closed this Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0