Results 1 to 4 of 4
  1. #1
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121

    Light streamer for Login user

    (Application created by using codeigniter php framework)&nbsp;<br>In my case, i'm using login option to view the market rates to the users. I'm storing their username, password, user agent and session id(Created by php codeigniter).<br>if the user login with same username,password,user agent and session id means nothing problem. If login with same username,password with different session id and different browser mean will ask the security code to terminate previous session,so if the use give current security code means previously opened page will be close and navigate to login page. And current session will be activate and store in database like with previous details.<br>Now everything work fine for my previous solution.<br>Previous solutionJava script set_timeout())<br>&nbsp; &nbsp; &nbsp;In this function i'm using ajax and making request to server(php), there i'm checking the current user session with with database table. If current session id with holding current username and password means will return true, else return false. If false means page will navigate to login page. This will continuously checking for every minutes.<br><br>So how to do this using Lightstreamer push, so that i can restrict to login more than one user with identical login details.<br><br><br><br>

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

    please check this thread: http://forums.lightstreamer.com/show...on-termination it should contain the answer you're lookin' for

  3. #3
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    I couldn't understand from above link. Is there any samples for this. Even i couldn't set session id from client.
    I used like bellow but showing error.
    require(["LightstreamerClient", "StatusWidget", "Subscription", "StaticGrid","ConnectionDetails"], function(LightstreamerClient, StatusWidget, Subscription, StaticGrid, ConnectionDetails) {
    var client = new LightstreamerClient("http://localhost:8880", "BULLION");
    client.addListener(new StatusWidget("left", "50%"));
    client.setUser(new ConnectionDetails("userid"));
    client.connect();

    var grid = new StaticGrid("stocks", true);


    var subscription = new Subscription("MERGE", grid.extractItemList(), grid.extractFieldList());
    subscription.addListener(grid);
    subscription.setDataAdapter("bullionclient");
    subscription.setRequestedSnapshot("yes");

    client.subscribe(subscription);
    });
    </script>

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    your setUser call is not correct, you should simply use


 

 

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:06 AM.