File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,6 @@ the ``PasswordDigest`` header value matches with the user's password::
206206 use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
207207 use Symfony\Component\Security\Core\User\UserProviderInterface;
208208 use Symfony\Component\Security\Core\Exception\AuthenticationException;
209- use Symfony\Component\Security\Core\Exception\NonceExpiredException;
210209 use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
211210 use App\Security\Authentication\Token\WsseUserToken;
212211
@@ -259,7 +258,9 @@ the ``PasswordDigest`` header value matches with the user's password::
259258 // Validate that the nonce is *not* in cache
260259 // if it is, this could be a replay attack
261260 if ($cacheItem->isHit()) {
262- throw new NonceExpiredException('Previously used nonce detected');
261+ // In a real world application you should throw a custom
262+ // exception extending the AuthenticationException
263+ throw new AuthenticationException('Previously used nonce detected');
263264 }
264265
265266 // Store the item in cache for 5 minutes
You can’t perform that action at this time.
0 commit comments