diff options
Diffstat (limited to 'plugins/mod_tokenauth.lua')
-rw-r--r-- | plugins/mod_tokenauth.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index 5edf51fd..fa8020bc 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -25,6 +25,10 @@ function create_jid_token(actor_jid, token_jid, token_role, token_ttl, token_dat return nil, "invalid-host"; end + if (token_data and type(token_data) ~= "table") or (token_purpose and type(token_purpose ~= "string")) then + return nil, "bad-request"; + end + local token_info = { owner = actor_jid; created = os.time(); |