Skip to content

Commit

Permalink
console.WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kraynyukhov committed Jul 14, 2018
1 parent e553ede commit 0146b10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/console/console/methods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ methods.messages={}
methods.private={}
methods._cn_w_params_method={}
methods._cn_wo_params_method={}
methods._request_wo_params_method={}
methods._request_w_params_method={}

methods.maps.active_users=nljson.decode([[{
}]]);
Expand Down Expand Up @@ -89,8 +91,8 @@ function(handler, params)
if(pam_auth:login(pam_config.service,username,password))
then
local message=methods.messages.login_success;
message.result[1].authkey=murmur.hashstr(username..time.now());
methods.maps.active_users[message.result[1].authkey]=username;
message.result[1].authkey=murmur.hashstr(handler);
methods.maps.active_users[tostring(handler)]=message.result[1].authkey;
ws:send(handler,message);
methods.private.push_view(handler);
else
Expand Down

0 comments on commit 0146b10

Please # to comment.