Skip to main content

All Questions

0 votes
0 answers
23 views

How can one enable a mix of authenticated and unauthenticated websockets using Django Channels?

I'm running a Django application with DRF and Channels and I've configured a number of websockets, one of which I need to be open/insecure. However, all I can figure out is how to enable/disable ...
Greg St. Onge's user avatar
0 votes
0 answers
123 views

Django Simple Jwt Authenticate multiple models

I'm working on a project that includes users communicating with devices( rpi's) via websockets. They only way I can think to make it more secure so other's can't access a websocket 'room' they aren't ...
badhabit16's user avatar
0 votes
1 answer
991 views

Django Channels retrieve the cookies from the HTTP handshake request (upgrade request)

I'm trying to retrieve the cookies at the start of the connection request in Django Channels. According to the normal flow, to establish a connection via websocket, a handshake is performed through ...
ByteBat's user avatar
  • 377
1 vote
1 answer
525 views

Django Channels long running consumer authentication issues

When using django channels, I have a long-running websocket connection. My users may become logged out due to their session expiring while this connection is still active. This causes sporadic ...
rykener's user avatar
  • 721
1 vote
2 answers
1k views

How to use Django's session authentication with Django Channels?

I am developing a chess web app using Django, Django Channels and React. I am using websockets for the game play between the online players and for getting updated which players are now online and ...
Awaaab's user avatar
  • 11
4 votes
2 answers
1k views

How do you authenticate a websocket connection with Knox token authentication on django channels?

I understand you can write custom authentication middleware to use in django channels 2. This works fine with Django's built-in token authentication but using django-rest-knox tokens is a different ...
Brian Min's user avatar
  • 295
0 votes
1 answer
2k views

How to add cookie to header through Django Channels?

In my frontend, I have the following configuration. Authentication is manual because react native fails at having persistent sessions: ... const authLink = setContext(request => storage....
Ren's user avatar
  • 4,629