From d4fae4b57b763eddfe1e1cdabb2dad3ec6816a8f Mon Sep 17 00:00:00 2001 From: bunkerity Date: Thu, 6 Apr 2023 11:46:52 +0200 Subject: [PATCH] session - add missing settings --- src/common/core/session/plugin.json | 27 +++++++++++++++++++++++++++ src/common/core/session/session.lua | 3 +++ 2 files changed, 30 insertions(+) diff --git a/src/common/core/session/plugin.json b/src/common/core/session/plugin.json index 05b77269e..02ff90935 100644 --- a/src/common/core/session/plugin.json +++ b/src/common/core/session/plugin.json @@ -22,6 +22,33 @@ "label": "Session name", "regex": "^\\w+$", "type": "text" + }, + "SESSION_IDLING_TIMEOUT": { + "context": "global", + "default": "1800", + "help": "Maximum time (in seconds) of inactivity before the session is invalidated.", + "id": "session-idling-timeout", + "label": "Session idling timeout", + "regex": "^\\d+$", + "type": "text" + }, + "SESSION_ROLLING_TIMEOUT": { + "context": "global", + "default": "3600", + "help": "Maximum time (in seconds) before a session must be renewed.", + "id": "session-rolling-timeout", + "label": "Session rolling timeout", + "regex": "^\\d+$", + "type": "text" + }, + "SESSION_ABSOLUTE_TIMEOUT": { + "context": "global", + "default": "86400", + "help": "Maximum time (in seconds) before a session is destroyed.", + "id": "session-absolute-timeout", + "label": "Session absolute timeout", + "regex": "^\\d+$", + "type": "text" } } } diff --git a/src/common/core/session/session.lua b/src/common/core/session/session.lua index 63043eac1..165de0386 100644 --- a/src/common/core/session/session.lua +++ b/src/common/core/session/session.lua @@ -64,6 +64,7 @@ function _M:init() } end session.init(config) + return true, "session init successful" end function _M:access() @@ -78,7 +79,9 @@ function _M:access() if err then return false, "can't refresh session : " .. err, nil, nil end + return true, "session exists", nil, nil end + return true, "session doesn't exist", nil, nil end return _M