--- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Wed Mar 15 15:49:46 2017 +0100
+++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Thu Dec 21 03:04:51 2017 +0100
@@ -33,9 +33,13 @@
end
local cached = cache:get(target_host);
- if cached and os.time() < cached.expires then
- host_session.posh = { jwk = cached };
- return false;
+ if cached then
+ if os.time() > cached.expires then
+ cache:set(target_host, nil);
+ else
+ host_session.posh = { jwk = cached };
+ return false;
+ end
end
local log = host_session.log or module._log;