-
-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure sessions #2
Comments
Hy @jodosha, can you provide some more context on what do you need here? |
@ricardovaleriano I've updated the description of this ticket with a design proposal. |
@jodosha what would Now it looks like two session middlewares will be used at the same time for your example. |
@simi from the description:
I'm gonna rethink the proposal, the actual is verbose because of the framework internals. |
Damn, I should try to read better. Anyway, |
@simi I confirm. please have a look at the updated proposal. |
Nice @jodosha, thank you for the clarification. |
Is anybody doing something about this issue? If not I'd like to help with this. |
It's assigned to me but I have plans to work on it over the weekend or by the end of the week. If you'd like to take it for spin and you'll have it completed sooner then I don't mind at all. |
A Lotus application should provide an API to enable sessions and to allow developers to set options for it. This should take advantage of the middleware configuration (#40).
Proposal:
Please note that
sessions true
should enable sessions, by includingLotus::Action::Sessions
intoBookshelf::Action
taking advantage ofLotus::Controller::Configuration#modules
.The ideal place where this should happen is at the load time.
Alternative proposal:
This should:
Rack::Session::Redis
middleware and add it withmiddleware.use
This is alternative is nicer, because it hides the internal requirements of the framework (see
sessions true
above). On the other hand, we're introducing a convention::redis
=>Rack::Session::Redis
. I'd make#sessions
to accept also a class (name). Examplesessions MySessionStore
and/orsessions 'MySessionStore'
.The text was updated successfully, but these errors were encountered: