Skip to content

Commit f5b6085

Browse files
Update passwords.rst
1 parent 0af9a84 commit f5b6085

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

security/passwords.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ you must register a service for it in order to use it as a named hasher:
644644
645645
<config>
646646
<!-- ... -->
647-
<security:password_hasher class="app_hasher"
647+
<security:password_hasher class="App\Entity\User"
648648
id="App\Security\Hasher\MyCustomPasswordHasher"/>
649649
</config>
650650
</srv:container>
@@ -657,12 +657,12 @@ you must register a service for it in order to use it as a named hasher:
657657
658658
return static function (SecurityConfig $security): void {
659659
// ...
660-
$security->passwordHasher('app_hasher')
660+
$security->passwordHasher('App\Entity\User')
661661
->id(MyCustomPasswordHasher::class)
662662
;
663663
};
664664
665-
This creates a hasher named ``app_hasher`` from a service with the ID
665+
This creates a hasher named ``App\Entity\User`` from a service with the ID
666666
``App\Security\Hasher\MyCustomPasswordHasher``.
667667

668668
Hashing a Stand-Alone String
@@ -862,7 +862,7 @@ Now, define a password hasher using the ``id`` setting:
862862
<config>
863863
<!-- ... -->
864864
<!-- id: the service ID of your custom hasher (the FQCN using the default services.yaml) -->
865-
<security:password_hasher class="app_hasher"
865+
<security:password_hasher class="App\Entity\User"
866866
id="App\Security\Hasher\CustomVerySecureHasher"/>
867867
</config>
868868
</srv:container>
@@ -875,7 +875,7 @@ Now, define a password hasher using the ``id`` setting:
875875
876876
return static function (SecurityConfig $security): void {
877877
// ...
878-
$security->passwordHasher('app_hasher')
878+
$security->passwordHasher('App\Entity\User')
879879
// the service ID of your custom hasher (the FQCN using the default services.yaml)
880880
->id(CustomVerySecureHasher::class)
881881
;

0 commit comments

Comments
 (0)