<?php
namespace App\EventListener;
use App\Entity\User;
use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationFailureEvent;
/**
* Authentication Failure Listener.
*
* This listener add data to payload.
*/
class AuthenticationFailureListener
{
/**
* When this event happened, response can be updated.
*
* @param AuthenticationFailureEvent $event the authentication Failure event
*/
public function onAuthenticationFailureResponse(AuthenticationFailureEvent $event): void
{
$response = $event->getResponse();
//TODO : edit your response here
// dd($response);
$event->setResponse($response);
}
}