-
September 24th, 2013, 09:50 AM
#1
Light streamer for Login user
(Application created by using codeigniter php framework) <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 solution
Java script set_timeout())<br> 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>
-
September 24th, 2013, 10:36 AM
#2
Hi,
please check this thread: http://forums.lightstreamer.com/show...on-termination it should contain the answer you're lookin' for
-
September 25th, 2013, 08:43 AM
#3
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>
-
September 25th, 2013, 10:20 AM
#4
your setUser call is not correct, you should simply use
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 12:53 PM.
Bookmarks