Websocket accessing data from private-channel

I want to access data from a private-channel with authorization in web-socket. What will be the best solution for this. I’m searching about it but can’t find any solution.
Like-

Echo echo = new Echo({
      'broadcaster': 'socket.io',
      'host': 'http://test.api.tripegate.com:6001/',
      'client': IO.io,
      'auth': {
        'headers': {'Authorization': 'Bearer $referenceToken}
      }
    });
    echo.private(channelName).listen('.flight-search-result', (e) {
      print(e);
    });