src/EventListener/AuthenticationSuccessListener.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: rostandnj
  5.  * Date: 26/7/19
  6.  * Time: 10:06 PM
  7.  */
  8. namespace App\EventListener;
  9. use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent;
  10. class AuthenticationSuccessListener
  11. {
  12.     public function onAuthenticationSuccessResponse(AuthenticationSuccessEvent $event)
  13.     {
  14.         $event->getResponse()->setStatusCode(201);
  15.       /*  $event->setData([
  16.             'code' => $event->getResponse()->getStatusCode(),
  17.             'payload' => $event->getData(),
  18.         ]);*/
  19.     }
  20. }