bungle / lua-resty-session

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

Is it possible to manipulate an existing session from an external source? #115

Open emily-ng opened 3 years ago

emily-ng commented 3 years ago

Hi, I'm using a function from an external library that opens and and starts a lua resty session and then returns it. However I'd like to add some custom data to that session and save it. Is that possible? I'm fairly new to lua-resty-session so I might be missing something. Thanks in advance.

bungle commented 3 years ago

You should be able to open the session again, but you need to use similar configuration (as the library). You can always setup another session too (change the name to not conflict with other library) and store your additional data there. You may be able to modify the library too to be able to pass your additional data there, or perhaps the whole session instance.