mod_sasl2_fast/mod_sasl2_fast.lua
changeset 5099 745c7f4cca40
parent 5088 dda2af7ed02f
child 5141 471cbb583a1d
equal deleted inserted replaced
5098:c92c87daa09e 5099:745c7f4cca40
     3 local id = require "util.id";
     3 local id = require "util.id";
     4 local jid = require "util.jid";
     4 local jid = require "util.jid";
     5 local st = require "util.stanza";
     5 local st = require "util.stanza";
     6 local now = require "util.time".now;
     6 local now = require "util.time".now;
     7 local hash = require "util.hashes";
     7 local hash = require "util.hashes";
       
     8 
       
     9 module:depends("sasl2");
     8 
    10 
     9 -- Tokens expire after 21 days by default
    11 -- Tokens expire after 21 days by default
    10 local fast_token_ttl = module:get_option_number("sasl2_fast_token_ttl", 86400*21);
    12 local fast_token_ttl = module:get_option_number("sasl2_fast_token_ttl", 86400*21);
    11 -- Tokens are automatically rotated daily
    13 -- Tokens are automatically rotated daily
    12 local fast_token_min_ttl = module:get_option_number("sasl2_fast_token_min_ttl", 86400);
    14 local fast_token_min_ttl = module:get_option_number("sasl2_fast_token_min_ttl", 86400);