Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Kapolei
    Posts
    6

    Authentication with LiteralBasedProvider and NetworkedDataProvider

    I am using these two providers:

    com.lightstreamer.adapters.metadata.LiteralBasedPr ovider
    com.lightstreamer.adapters.remote.data.NetworkedDa taProvider

    I am building an adapter in PHP that speaks with the NetworkedDataProvider. So far everything is working out nicely, but for the life of me can't see how to enable the authentication layer. I understand how to handle the incoming packets, but I am not seeing them in the request channel. I am constantly polling the socket for new requests, but not getting any. In the JavaScript client, I have enabled auth by setting the username/password. From what I gather, authentication is delt with in the Metadata layer, but I don't see where to enable it.

    Any pointers much appreciated!

    Best,

    Erik Osterman

    adapters.xml:


    Code:
    <?xml version="1.0"?>
    <adapters_conf id="COMET">
      <metadata_provider>
        <adapter_class>com.lightstreamer.adapters.metadata.LiteralBasedProvider</adapter_class>
      </metadata_provider>
      <data_provider>
        <adapter_class>com.lightstreamer.adapters.remote.data.NetworkedDataProvider</adapter_class>
          <param name="request_reply_port">7001</param>
          <param name="notify_port">7002</param>
          <param name="timeout">36000000</param>                                                                                                                                       
      </data_provider>
    </adapters_conf>

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    516
    Hi Erik,

    You are using a remote Data Adapter and a local Metadata Adapter. To handle authentication from your PHP code you need to use a remote Metadata Adapter too.

    To do that, instead of "com.lightstreamer.adapters.metadata.LiteralBasedP rovider", you should use "com.lightstreamer.adapters.remote.metadata.Network edMetadataProvider".

    For a full config file example, please see "Lightstreamer\DOCS-SDKs\sdk_adapter_remoting_infrastructure\conf\sock ets" or "Lightstreamer\DOCS-SDKs\sdk_adapter_remoting_infrastructure\conf\sock ets(robust)" in any Lightstreamer distribution.

    Cheers,

    Alessandro

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Kapolei
    Posts
    6
    Now, when you say that it makes perfect sense. I didn't think to try that.

    Quote Originally Posted by Alessandro

    To do that, instead of "com.lightstreamer.adapters.metadata.LiteralBasedP rovider", you should use "com.lightstreamer.adapters.remote.metadata.Network edMetadataProvider".

    Thanks, that works perfectly!

    Best,

    Erik Osterman

 

 

Similar Threads

  1. User Authentication Issue
    By karthik655 in forum Client APIs
    Replies: 3
    Last Post: May 3rd, 2012, 10:07 AM
  2. Client Authentication via X.509
    By brianjohnson in forum General
    Replies: 3
    Last Post: March 12th, 2010, 02:14 PM
  3. Authentication with Metadata Adapter
    By stephenlam in forum Adapter APIs
    Replies: 4
    Last Post: December 12th, 2008, 10:52 AM
  4. Replies: 2
    Last Post: March 26th, 2008, 09:50 AM
  5. Deprecation warning in the LiteralBasedProvider
    By jsharpe in forum Client APIs
    Replies: 1
    Last Post: April 19th, 2007, 09:24 AM

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 03:25 AM.