Re[2]: How to authenticate a user in websocket connection in django channels when using token authentication

2017-11-16 Thread Dominik Szmaj
Ok, this was entirely my fault. I created groups with id of a user.username and didn't add message.reply_channel to this group right after successful token verification. __ Pozdrawiam, Dominik Szmaj W dniu 15.11.2017 21:13:00, "Dominik Szmaj" pisze Hey, I've

Re: How to authenticate a user in websocket connection in django channels when using token authentication

2017-11-15 Thread Dominik Szmaj
Hey, I've done this websocket authorization almost exactly like Robin, and it's working (like receiving token with query params, verifying it and things) but it's not properly opening connection (like its not sending accept: True, which I do after verification) and connection is permanently

Re: How to authenticate a user in websocket connection in django channels when using token authentication

2017-09-16 Thread Robin Lery
Ok, thanks. So, I was confused about two things on authenticating a user. 1. What to do with the token? - You can pass the token as a query string and get that query params. Read more about how to get the query params here

Re: How to authenticate a user in websocket connection in django channels when using token authentication

2017-09-15 Thread Andrew Godwin
You'll have to write your own authentication code that runs in `connect` and puts a user into the channel session - there's nothing built in that will really help you past that I'm afraid. Andrew On Thu, Sep 14, 2017 at 6:35 PM, Robin Lery wrote: > I am using a frontend

How to authenticate a user in websocket connection in django channels when using token authentication

2017-09-14 Thread Robin Lery
I am using a frontend framework (Vuejs ) and django-rest-framework for the REST API in my project. Also, for JSON web token authentication I am using django-rest-framework-jwt . After a