Results 1 to 2 of 2
  1. #1

    Enabling Authentication

    Hello,

    I have a working lightstreamer integration based on a node js / javascript client implementation.

    I have the following adapter.xml:

    <adapter_class>com.lightstreamer.adapters.remote.m etadata.RobustNetworkedMetadataProvider</adapter_class>
    <classloader>log-enabled</classloader>
    <param name="request_reply_port">6662</param>
    <param name="timeout">36000000</param>
    </metadata_provider>
    <data_provider>
    <adapter_class>com.lightstreamer.adapters.remote.d ata.RobustNetworkedDataProvider</adapter_class>
    <classloader>log-enabled</classloader>
    <param name="request_reply_port">6663</param>
    <param name="notify_port">6664</param>
    </data_provider>


    I also have a notifyUser listener:

    metadataProvider.on('notifyUser', function(request, response){

    console.log("notifyUser...");
    console.log(request);
    console.log(request['userName']);
    console.log(request['userPassword']);
    response.success();

    });

    This prints the following:

    notifyUser...
    { id: '10000014588ddcd8a',
    verb: 'notifyUser',
    userName: null,
    userPassword: null,
    headers:
    { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'cache-control': 'no-cache',
    connection: 'keep-alive',
    host: 'localhost',
    'accept-language': 'en-US,en;q=0.5',
    accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'content-length': '147',
    origin: 'https://localhost:4433',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0',
    'accept-encoding': 'gzip, deflate',
    referer: 'https://localhost:4433/view1',
    pragma: 'no-cache',
    REQUEST_ID: '294' } }
    null
    null

    ... and then crashes the server.

    1) the userName and userPassword fields are null - where exactly do these need to be passed so that they are available here to carry out the authentication?

    2) Why does the server then crash?

    3) I have had a long look and play around with the code. I can't seem to find the correct documentation on the arguments that will be passed to :

    metadataProvider.on('notifyUser',........

    Thanks in advance.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,

    1) it depends on the client library in use. As an example, if you're using the JavaScript client library you would do



    see http://www.lightstreamer.com/distros...onDetails.html

    2) which server crashes? Lightstreamer or node.js? Do you get any error?

    3) you can find it here: http://www.lightstreamer.com/distros...dcca465d0.html

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 06:02 PM.