Hi,
-- I am trying to use the query_string parameter and I want to ask what is the correct way how to use it.
I am using JsonWebsocketConsumer and when debugging I noticed that on the Handshake the message content contains path, headers, query_string, client, server, reply_channel and order.
But every other message contains just reply_channel, path, order and text.
How should I correctly use it? Specifically I want authenticate user based on the query_string (I send token in it) I can do that in connection phase but what should I do next? On every other message the user is AnnonymousUser because there is no query_string. Should I save query_string into channel_session? Should I save user into channel_session?
BTW I cannot use user from http session because I am connecting to WS from the mobile app.
Thanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a30535e3-29e1-4547-af70-0e391d1b80d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment