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::
206
206
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
207
207
use Symfony\Component\Security\Core\User\UserProviderInterface;
208
208
use Symfony\Component\Security\Core\Exception\AuthenticationException;
209
- use Symfony\Component\Security\Core\Exception\NonceExpiredException;
210
209
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
211
210
use App\Security\Authentication\Token\WsseUserToken;
212
211
@@ -259,7 +258,9 @@ the ``PasswordDigest`` header value matches with the user's password::
259
258
// Validate that the nonce is *not* in cache
260
259
// if it is, this could be a replay attack
261
260
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');
263
264
}
264
265
265
266
// Store the item in cache for 5 minutes
You can’t perform that action at this time.
0 commit comments