Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] MakeAuthenticationTrustResolverInterface::isAuthenticated() non-virtual#42644
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedAug 19, 2021
I'm a bit lost when I read such things in deprecation messages: It feels like this method shouldn't exist, and that neither But I'm missing the bigger picture here, so that this might only be the expression of my ignorance of this subsystem :) |
chalasr commentedAug 19, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Tokens don't hold an authenticated state anymore, that's what the deprecation message you linked tells. But I understand the confusion though. Basically, this method should return false when |
wouterj commentedAug 19, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm not sold for 100% on
So I would say I recently added |
nicolas-grekas commentedAug 19, 2021
It feels like these statements are contradictory. Another way to solve this would be to reintroduce |
nicolas-grekas commentedAug 19, 2021
we need to converge on this also :) |
wouterj commentedAug 19, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
New proposal: drop Making something nullable while the interface doesn't yet is PHP compatible:https://3v4l.org/BWs0v In The only reason for |
wouterj commentedAug 19, 2021
Other proposal: Drop |
chalasr commentedAug 19, 2021
I'd also fix that on the voter side rather than making So 👍 to drop |
fabpot commentedAug 19, 2021
I would also vote for a signature change and the removal of |
nicolas-grekas commentedAug 19, 2021
I don't see how to make The only option I see is either to make |
wouterj commentedAug 19, 2021
Any particular reasons my 2 proposals above won't be feasible as a BC way to introduce nullability? |
nicolas-grekas commentedAug 19, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
because implementations also are affected: they're not final (especially the abstract and because then I wouldn't know what to do with voters that don't accept null: deny or abstain? Not sure there is one single answer to this question.
at least keeping |
nicolas-grekas commentedAug 19, 2021
An alternative might be to make |
nicolas-grekas commentedAug 19, 2021
See#42650 |
nicolas-grekas commentedAug 20, 2021
Thank you@chalasr. |
…tell about unauthenticated tokens (nicolas-grekas)This PR was merged into the 5.4 branch.Discussion----------[Security] make TokenInterface::getUser() nullable to tell about unauthenticated tokens| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -As discussed in#42644I think this might work well.Commits-------d9cd41c [Security] make TokenInterface::getUser() nullable to tell about unauthenticated tokens
The method has been added in#42510 (5.4) as a replacement for
isAnonymous().