Skip to content

[PasswordHasher] Update example of usage CustomPasswordHasher #21181

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions security/passwords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ you must register a service for it in order to use it as a named hasher:
security:
# ...
password_hashers:
app_hasher:
App\Entity\User:
id: 'App\Security\Hasher\MyCustomPasswordHasher'

.. code-block:: xml
Expand Down Expand Up @@ -842,7 +842,7 @@ Now, define a password hasher using the ``id`` setting:
security:
# ...
password_hashers:
app_hasher:
App\Entity\User:
# the service ID of your custom hasher (the FQCN using the default services.yaml)
id: 'App\Security\Hasher\MyCustomPasswordHasher'

Expand Down