--- a/plugins/mod_tokenauth.lua Tue Apr 04 08:55:15 2023 +0200
+++ b/plugins/mod_tokenauth.lua Wed Apr 05 15:33:56 2023 +0100
@@ -278,6 +278,13 @@
return true;
end
+function revoke_grant(username, grant_id)
+ local ok, err = token_store:set_key(username, grant_id, nil);
+ if not ok then return nil, err; end
+ module:fire_event("token-grant-revoked", { id = grant_id, username = username, host = module.host });
+ return true;
+end
+
function sasl_handler(auth_provider, purpose, extra)
return function (sasl, token, realm, _authzid)
local token_info, err = get_token_info(token);