-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Make AuthenticationTrustResolverInterface::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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 :) |
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 |
I'm not sold for 100% on
So I would say I recently added |
It feels like these statements are contradictory. Another way to solve this would be to reintroduce |
we need to converge on this also :) |
New proposal: drop Making something nullable while the interface doesn't yet is PHP compatible: https://3v4l.org/BWs0v In The only reason for |
Other proposal: Drop |
I'd also fix that on the voter side rather than making So 👍 to drop |
I would also vote for a signature change and the removal of |
I don't see how to make The only option I see is either to make |
Any particular reasons my 2 proposals above won't be feasible as a BC way to introduce nullability? |
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 |
An alternative might be to make |
See #42650 |
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 #42644 I 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()
.