mod_sasl2_fast/mod_sasl2_fast.lua
changeset 5307 b10a7082b3c3
parent 5291 4834eaf24fc1
child 5886 563c2c70cb9f
--- a/mod_sasl2_fast/mod_sasl2_fast.lua	Tue Apr 04 18:09:48 2023 +0100
+++ b/mod_sasl2_fast/mod_sasl2_fast.lua	Wed Apr 05 19:38:59 2023 +0100
@@ -245,3 +245,10 @@
 	end
 	return false;
 end
+
+function revoke_fast_tokens(username, client_id)
+	local client_id_hash = hash.sha256(client_id, true);
+	local cur_ok = token_store:set(username, client_id_hash.."-cur", nil);
+	local new_ok = token_store:set(username, client_id_hash.."-new", nil);
+	return cur_ok and new_ok;
+end