Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update openidc.lua #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/resty/openidc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ local cjson = require("cjson")
local cjson_s = require("cjson.safe")
local http = require("resty.http")
local r_session = require("resty.session")
r_session.session_compressor = "zlib"
r_session.session_cookie_maxsize = 8000
local string = string
local ipairs = ipairs
local pairs = pairs
Expand Down Expand Up @@ -1142,6 +1144,8 @@ function openidc.save_as_authenticated(opts,session,json,do_redirect)

local current_time = ngx.time()
if session == nil then
log(DEBUG, "Compressor " .. r_session.session_compressor)
log(DEBUG, "Cookie Max Size " .. r_session.session_cookie_maxsize)
session, session_error = r_session.start(session_opts)
if session == nil then
log(ERROR, "Error starting session: " .. session_error)
Expand Down Expand Up @@ -1775,4 +1779,4 @@ function openidc.set_logging(new_log, new_levels)
WARN = new_levels.WARN and new_levels.WARN or ngx.WARN
end

return openidc
return openidc