Skip to content

Commit 7fb76a5

Browse files
norkunasjaviereguiluz
authored andcommitted
[Security] Fix typehint in custom user provider
1 parent af71162 commit 7fb76a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

security/user_providers.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ command will generate a nice skeleton to get you started::
290290

291291
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
292292
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
293+
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
293294
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
294295
use Symfony\Component\Security\Core\User\UserInterface;
295296
use Symfony\Component\Security\Core\User\UserProviderInterface;
@@ -347,13 +348,13 @@ command will generate a nice skeleton to get you started::
347348
}
348349

349350
/**
350-
* Upgrades the encoded password of a user, typically for using a better hash algorithm.
351+
* Upgrades the hashed password of a user, typically for using a better hash algorithm.
351352
*/
352-
public function upgradePassword(UserInterface $user, string $newEncodedPassword): void
353+
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
353354
{
354-
// TODO: when encoded passwords are in use, this method should:
355+
// TODO: when hashed passwords are in use, this method should:
355356
// 1. persist the new password in the user storage
356-
// 2. update the $user object with $user->setPassword($newEncodedPassword);
357+
// 2. update the $user object with $user->setPassword($newHashedPassword);
357358
}
358359
}
359360

0 commit comments

Comments
 (0)