public function onAuthenticationSuccessResponse(AuthenticationSuccessEvent $event)
    {
        $data = $event->getData();
        $data['user'] = $event->getUser()->getUsername();

        $event->setData($data);
    }
public function onAuthenticationSuccessResponse(AuthenticationSuccessEvent $event)
    {
        $data = $event->getData();
        $data['user'] = $event->getUser()->getUsername();

        $event->setData($data);
    }
public function onAuthenticationSuccessResponse ( AuthenticationSuccessEvent $ event ) { $ data = $ event -> getData ( ) ; $ data [ 'user' ] = $ event -> getUser ( ) -> getUsername ( ) ; $ event -> setData ( $ data ) ; }
Add public data to the authentication response.

@param AuthenticationSuccessEvent $event
Add public data to the authentication response .