add wtv-ticket store api

- fix broken session bust crap from before
- properly resume session as user when server restarted
- api available to store other things in the wtv-ticket
This commit is contained in:
zefie
2022-02-08 16:10:15 -05:00
parent d1c70c7ab1
commit bf7369431e
7 changed files with 124 additions and 37 deletions

View File

@@ -17,7 +17,7 @@ if (!request_headers.query.registering ||
ssid_sessions[socket.ssid].setSessionData("subscriber_username", request_headers.query.subscriber_username);
ssid_sessions[socket.ssid].setSessionData("subscriber_contact", request_headers.query.subscriber_contact);
ssid_sessions[socket.ssid].setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method);
ssid_sessions[socket.ssid].setSessionData("subscriber_userid", '1' + Math.floor(Math.random() * 1000000000000000000));
ssid_sessions[socket.ssid].setSessionData("subscriber_userid", 0);
ssid_sessions[socket.ssid].setSessionData("registered", true);
if (!ssid_sessions[socket.ssid].storeSessionData(true)) {
var errpage = wtvshared.doErrorPage(400);