-
Notifications
You must be signed in to change notification settings - Fork 59
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
Decorate request with session key #88
Comments
Thanks for the heads up. |
This has been taken care of with the v6 release. |
Hi @mark-bradshaw, Could you, please, explain, why we've moved to I saw that If The problem is, that if everybody would fulfil the new recommendations, then the Am I miss something? Regards, |
@PavelPolyakov I'm following Eran's request on this. He asked that we move our data to something more unique, like I understand that we could still try to stay on But I do see the point of what you're saying, and I have to agree that request.session is a very logical place for all this. Perhaps we can find a way to allow people to choose to have yar at that location instead as a config option. |
I think it's better to use a unique name as many people use both session modules at the same time. |
I generally agree with that sentiment. This falls in line with the idea behind hapi's decorators, which enforce that there be no naming conflicts. Naming conflicts cause the worst kind of confusion. To start, I imagine the case of registering a plugin that registers yar (or some other session-related plugin). If someone wanted to, wouldn't it be just a small amount of code to place |
I guess it would depend on the order of the decorations. If yar went first On Sat, Jan 9, 2016 at 10:52 AM devin ivy notifications@github.com wrote:
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
hapi v12 removes the
request.session
placeholder. It will not break this module but you should officially decorate the request with the key to make sure other plugins can't if both are loaded. It might be best to call it something more unique likerequest.yar
so that other plugins like (hapi-auth-cookie) won't have a conflict (as they should stop using therequest.auth.session
key).The text was updated successfully, but these errors were encountered: