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
Use case: When a session is create I would like to load session data from storage such as mysql. This data may include user profile data such as first and last name.
Currently I can do this using Lua at the time when a session is created. However I want to treat session creation as "non-functional" and generic, while still giving each application an ability to populate the session with "functional" information.
One thought I have is to configure an internal location block, e.g. set $session.loader _my_session_loader;, and then at some point in the session lifecycle, we can make a subrequest to the loader. The result of the loader will be stored in the session.
Thoughts?
The text was updated successfully, but these errors were encountered:
When session is started and it is a new one, you want to execute a function (callback/event handler) to retrieve some user's data that does something like this:
session.data=load_user_data_table(userid)
One way to do it currently is that you create your own wrapper (or proxy), and not use session directly. It isn't hard to add this to session but how would you signal your session.loader to load particular users' data (see above the userid argument)?
Maybe others need this as well. Can you maybe fork this project and then show me how you would like this to work, there is not too many lines in session.lua.
Use case: When a session is create I would like to load session data from storage such as mysql. This data may include user profile data such as first and last name.
Currently I can do this using Lua at the time when a session is created. However I want to treat session creation as "non-functional" and generic, while still giving each application an ability to populate the session with "functional" information.
One thought I have is to configure an internal location block, e.g.
set $session.loader _my_session_loader;
, and then at some point in the session lifecycle, we can make a subrequest to the loader. The result of the loader will be stored in the session.Thoughts?
The text was updated successfully, but these errors were encountered: