-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix custom password hasher doc #16390
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
The docs confused `UserPasswordHasherInterface` with `PasswordHasherInterface`. Implementing a custom `UserPasswordHasherInterface` most likely is not what the developer wants to do. The subsequent docs configured the example at places where a `PasswordHasherInterface` is expected.
@MarkPedron thanks for this contribution. Sadly, at this point, I no longer know which is the good interface and/or methods. We have two similar but different things and I find this highly confusing. So, I can't merge this confidence 😐 @chalasr @wouterj do you think we could do something in Symfony code to improve this situation? Thanks! |
Regarding this, the situation is quite similar to previous versions (password encoders).
As a developer, you configure built-in PasswordHasherInterface implementations or register custom ones via the In my humble opinion, there is nothing to do on that part, the design feels right :) |
@chalasr Would it make sense to turn your eloquent explanation into a section in the relevant Security documentation? |
Robin, thanks for the explanation. My two main confusion points are: (1) There are two very similar interfaces with very different names for similar methods:
(2) The second subtle confusion comes from this interface name --> I understand it as --> "hash this user password" ("user password" + "hasher") It'd be easier to understand if it was called --> |
If it helps, I would offer to add an explanation following @chalasr comment to the docs. |
I agree with Javier that the name of Anyway, if anyone has a suggestion, please open a pull request renaming the interface in symfony/symfony. That way, we can move the issue forwards. @MarkPedron thank you for fixing this section of the docs. The PR is perfect 👍 |
The docs confused
UserPasswordHasherInterface
withPasswordHasherInterface
.Implementing a custom
UserPasswordHasherInterface
most likely is not what the developer wants to do.The subsequent docs configured the example at places where a
PasswordHasherInterface
is expected.