mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
update keychain if exists
This commit is contained in:
parent
4479c9a882
commit
a44d12fa03
@ -1,4 +1,5 @@
|
|||||||
require("sqlite")
|
require("sqlite")
|
||||||
|
local TUNNEL_KEYCHAIN = "/opt/www/tmp/channels/antunnel_keychain"
|
||||||
function fail(msg)
|
function fail(msg)
|
||||||
std.custom_header("Connection","close")
|
std.custom_header("Connection","close")
|
||||||
std.json()
|
std.json()
|
||||||
@ -48,6 +49,10 @@ function is_auth()
|
|||||||
if data == nil or data[1] == nil then return die("No user data found") end
|
if data == nil or data[1] == nil then return die("No user data found") end
|
||||||
-- next time check the stamp
|
-- next time check the stamp
|
||||||
SESSION.user = data[1].username
|
SESSION.user = data[1].username
|
||||||
|
local f = io.open(TUNNEL_KEYCHAIN, "w")
|
||||||
|
if f then
|
||||||
|
f:write(sessionid)
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user