diff --git a/access.lua b/access.lua index 3964af0..0967eca 100644 --- a/access.lua +++ b/access.lua @@ -41,11 +41,11 @@ if ngx.var.host ~= conf["portal_domain"] and ngx.var.request_method == "GET" the -- Use the `cache` shared table where a username is associated with -- a CDA key - user = cache:get(cda_key) + user = cache:get("CDA|"..cda_key) if user then hlp.set_auth_cookie(user, ngx.var.host) ngx.log(ngx.NOTICE, "Cross-domain authentication: "..user.." connected on "..ngx.var.host) - cache:delete(cda_key) + cache:delete("CDA|"..cda_key) end uri_args[conf.login_arg] = nil diff --git a/helpers.lua b/helpers.lua index 41e8f37..db87a8b 100644 --- a/helpers.lua +++ b/helpers.lua @@ -108,7 +108,7 @@ end -- Set the Cross-Domain-Authentication key for a specific user function set_cda_key() local cda_key = random_string() - cache:set(cda_key, authUser, 10) + cache:set("CDA|"..cda_key, authUser, 10) return cda_key end