You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!$userinstanceof PasswordAuthenticatedUserInterface) {
139
-
trigger_deprecation('symfony/doctrine-bridge', '5.3', 'The "%s::upgradePassword()" method expects an instance of "%s" as first argument, the "%s" class should implement it.', PasswordUpgraderInterface::class, PasswordAuthenticatedUserInterface::class, get_debug_type($user));
140
-
}
141
-
142
138
$class = $this->getClass();
143
139
if (!$userinstanceof$class) {
144
140
thrownewUnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_debug_type($user)));
145
141
}
146
142
147
143
$repository = $this->getRepository();
148
144
if ($repositoryinstanceof PasswordUpgraderInterface) {
if (!$userinstanceof PasswordAuthenticatedUserInterface) {
55
+
thrownew \LogicException(sprintf('Class "%s" must implement "%s" for using password-based authentication.', get_debug_type($user), PasswordAuthenticatedUserInterface::class));
56
+
}
57
+
54
58
$currentUser = $token->getUser();
55
-
if ($currentUserinstanceof UserInterface) {
59
+
60
+
if ($currentUserinstanceof PasswordAuthenticatedUserInterface) {
56
61
if ($currentUser->getPassword() !== $user->getPassword()) {
57
62
thrownewBadCredentialsException('The credentials were changed from another session.');
58
63
}
@@ -65,15 +70,7 @@ protected function checkAuthentication(UserInterface $user, UsernamePasswordToke
65
70
thrownewBadCredentialsException('The presented password is invalid.');
66
71
}
67
72
68
-
if (!$userinstanceof PasswordAuthenticatedUserInterface) {
69
-
trigger_deprecation('symfony/security-core', '5.3', 'Using password-based authentication listeners while not implementing "%s" interface from class "%s" is deprecated.', PasswordAuthenticatedUserInterface::class, get_debug_type($user));
70
-
}
71
-
72
-
$salt = $user->getSalt();
73
-
if ($salt && !$userinstanceof LegacyPasswordAuthenticatedUserInterface) {
74
-
trigger_deprecation('symfony/security-core', '5.3', 'Returning a string from "getSalt()" without implementing the "%s" interface is deprecated, the "%s" class should implement it.', LegacyPasswordAuthenticatedUserInterface::class, get_debug_type($user));
0 commit comments