public function onRequestCreate(Event $event)
    {
        $client = $event['client'];
        $token = $client->getToken();
        
        $event['request']->setHeader('X-Auth-Token', $token);
    }
public function onRequestCreate(Event $event)
    {
        $client = $event['client'];
        $token = $client->getToken();
        
        $event['request']->setHeader('X-Auth-Token', $token);
    }
public function onRequestCreate ( Event $ event ) { $ client = $ event [ 'client' ] ; $ token = $ client -> getToken ( ) ; $ event [ 'request' ] -> setHeader ( 'X-Auth-Token' , $ token ) ; }
Add authentication token as a header for requests

@param Event $event
Add authentication token as a header for requests