Uses JWT for token generation in prosody plugin.

This commit is contained in:
paweldomas
2015-11-18 12:49:36 -06:00
parent 029ccf3b31
commit d666fbb6a4
3 changed files with 35 additions and 65 deletions

View File

@@ -27,10 +27,9 @@ local provider = {};
local appId = module:get_option_string("app_id");
local appSecret = module:get_option_string("app_secret");
local tokenLifetime = module:get_option_number("token_lifetime");
function provider.test_password(username, password)
local result, msg = token_util.verify_password(password, appId, appSecret, tokenLifetime);
local result, msg = token_util.verify_password(password, appId, appSecret, nil);
if result == true then
return true;
else