bungle / lua-resty-session

Session library for OpenResty – flexible and secure
BSD 2-Clause "Simplified" License
320 stars 111 forks source link

new options: session.cookie persistent and session.check.ssi #3

Closed capr closed 9 years ago

capr commented 9 years ago

Options to enable persistent sessions.

Usage example:

function persistent_session(lifetime)
    session.persistent = true
    session.check.ssi = false --ssi will change after browser closes
    session.check.ua = false  --user could upgrade the browser
    session.cookie.lifetime = lifetime or 2 * 365 * 24 * 3600 --2 years
    return assert(session.start())
end
bungle commented 9 years ago

Thank you, I have implement this with a slightly modifications in lua-resty-session. Thank you for this idea!