Comparison

plugins/mod_tokenauth.lua @ 10675:5efd6865486c

mod_tokenauth: Track creation time of tokens
author Matthew Wild <mwild1@gmail.com>
date Fri, 28 Feb 2020 21:55:40 +0000
parent 10674:4459afac4d13
child 12649:86e1187f6274
comparison
equal deleted inserted replaced
10674:4459afac4d13 10675:5efd6865486c
16 return nil, "invalid-host"; 16 return nil, "invalid-host";
17 end 17 end
18 18
19 local token_info = { 19 local token_info = {
20 owner = actor_jid; 20 owner = actor_jid;
21 created = os.time();
21 expires = token_ttl and (os.time() + token_ttl) or nil; 22 expires = token_ttl and (os.time() + token_ttl) or nil;
22 jid = token_jid; 23 jid = token_jid;
23 session = { 24 session = {
24 username = token_username; 25 username = token_username;
25 host = token_host; 26 host = token_host;