You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation to describe the configuration of lua-resty-session version 4
The current documentation describes configuration for lua-resty-session version 3 only. Since following the default installation steps will set up lua-rest-session version 4, the documentation should reflect the configuration of version 4 instead.
This configuration should also provide an answer to several outstanding questions in the GitHub issues.
-- The full list of configuration options is documented in the lua-resty-session GitHub repository: https://github.com/bungle/lua-resty-session?tab=readme-ov-file#session-configuration
243
+
local session_opts = {
244
+
-- When using cookies to store sessions, set a shared secret for session cookie encryption. This allows sessions to remain valid after a restart of nginx.
245
+
-- It also enables "stateless" session management, so multiple instances of nginx can handle requests without the need for "sticky" load balancing techniques.
246
+
-- secret = "xxxxxxxxxxxxxxxxxxx",
247
+
-- Optionally, set the cookie prefix to prevent accidental overwriting of the session cookie
248
+
-- cookie_prefix = "__Host-",
249
+
-- Login session cookies should be HTTP Only
250
+
cookie_http_only = true,
251
+
-- Login session cookies should be marked as "Secure"
252
+
cookie_secure = true,
253
+
-- Set the same site cookie policy
254
+
cookie_same_site = "Lax",
255
+
-- Set this to true if you want login session cookies to persist a browser restart
256
+
remember = true
257
+
}
258
+
245
259
-- call authenticate for OpenID Connect user authentication
246
-
local res, err = require("resty.openidc").authenticate(opts)
260
+
local res, err = require("resty.openidc").authenticate(opts, nil, nil, session_opts)
0 commit comments