session - add missing settings

This commit is contained in:
bunkerity 2023-04-06 11:46:52 +02:00
parent a850442203
commit d4fae4b57b
2 changed files with 30 additions and 0 deletions

View File

@ -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"
}
}
}

View File

@ -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