From 662ae1a990abca47452c779e15f910021786857a Mon Sep 17 00:00:00 2001 From: graych Date: Wed, 12 Sep 2018 15:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20session=5Fcookie=5Frenew?= =?UTF-8?q?=20=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oidc-access.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oidc-access.lua b/oidc-access.lua index 471928e..459ff30 100644 --- a/oidc-access.lua +++ b/oidc-access.lua @@ -56,7 +56,7 @@ if oidc_access and oidc_access ~= "" and oidc_access ~= "none" then if val == nil then return nil end return val == true or (val == "1" or val == "true" or val == "on") end - + local session_opts = { name = session_name, secret = cfg["session_secret"] or cfg["client_secret"], @@ -119,7 +119,7 @@ if oidc_access and oidc_access ~= "" and oidc_access ~= "none" then return "auth" end local action = oidc_access_action() - local res, err, url, session = require("resty.openidc").authenticate(opts, nil, (action == "pass" or action == "no-auth") and "pass", session_opts) + local res, err, url, session = require("resty.openidc").authenticate(opts, nil, (action == "pass" or action == "no-auth") and "pass", require("resty.session").start(session_opts)) if err then ngx.log(ngx.ERR, err) if cfg["error_redirect"] then