Skip to content
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

Add ability to port http_session into websocket.receive #318

Closed
andrewgodwin opened this issue Aug 26, 2016 · 0 comments
Closed

Add ability to port http_session into websocket.receive #318

andrewgodwin opened this issue Aug 26, 2016 · 0 comments

Comments

@andrewgodwin
Copy link
Member

andrewgodwin commented Aug 26, 2016

Since it's nice to have read/write access to the main HTTP session rather than just a channel_session, the session helpers should be extended to add the ability to persist the HTTP session key into the channel_session and have this be exposed as an attribute on the message.

Changes probably needed:

  • New function to transfer http session key into channel session in a defined way
  • Either channel_session or http_session decorator changed so it rehydrates the session from the key
  • Roll calls to this stuff into the standard all-in-one decorators
  • Make sure it's easily accessible from generic consumers

I would say that we should probably just make it part of the normal channel_session decorator, as it's going to be generally useful, and that way it'll appear wherever someone thinks it should.

(Based on #271)

linuxlewis added a commit to linuxlewis/channels that referenced this issue Sep 9, 2016
Update the http_session decorator to write the http session key
to the channel_session when available. This allows the channel_session
decorator to rehydrate the http_session after the initial websocket
connection.

closes django#318
linuxlewis added a commit to linuxlewis/channels that referenced this issue Sep 9, 2016
Update the http_session decorator to write the http session key
to the channel_session when available. This allows the channel_session
decorator to rehydrate the http_session after the initial websocket
connection.

closes django#318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant